78% post-to-twitter-duco

Code Review | Post To Twitter

WordPress plugin Post To Twitter scored78%from 54 tests.

About plugin

  • Plugin page: post-to-twitter-duco
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.1
  • WordPress version: 6.3.1
  • First release: Feb 7, 2015
  • Latest release: Mar 14, 2015
  • Number of updates: 3
  • Update frequency: every 12.0 days
  • Top authors: dukeofharen (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,552 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.57ms] Passed 4 tests

Server-side resources used by Post To Twitter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.61 ▼2.64
Dashboard /wp-admin3.34 ▼0.0150.45 ▼19.08
Posts /wp-admin/edit.php3.39 ▲0.0348.88 ▼1.50
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.56 ▼13.97
Media Library /wp-admin/upload.php3.26 ▲0.0336.56 ▼2.60
Post To Twitter /wp-admin/options-general.php?page=post-to-twitter3.2336.13

Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Post To Twitter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.34 ▲0.191.97 ▲0.1645.45 ▲0.76
Dashboard /wp-admin2,199 ▲255.50 ▼0.1690.63 ▼2.1738.66 ▼6.60
Posts /wp-admin/edit.php2,104 ▲12.02 ▲0.0135.59 ▼7.7936.27 ▼3.41
Add New Post /wp-admin/post-new.php1,529 ▼623.18 ▲4.95672.52 ▲16.3972.32 ▲3.56
Media Library /wp-admin/upload.php1,404 ▲74.26 ▲0.07100.63 ▼2.2141.46 ▼3.69
Post To Twitter /wp-admin/options-general.php?page=post-to-twitter8912.0423.0430.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/post-to-twitter-duco/index.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/post-to-twitter-duco/views/settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/post-to-twitter-duco/views/twitter_metabox.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === post-to-twitter-duco === )
Please take inspiration from this readme.txt

post-to-twitter-duco/index.php 92% from 13 tests

The main file in "Post To Twitter" v. 0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-to-twitter-duco.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,151 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP51635301,151

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity125.00
▷ Minimum class complexity125.00
▷ Maximum class complexity125.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods42
▷ Static methods37.14%
▷ Public methods1535.71%
▷ Protected methods2764.29%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin