84% turn-down-for-publish

Code Review | Turn Down For Publish

WordPress plugin Turn Down For Publish scored84%from 54 tests.

About plugin

  • Plugin page: turn-down-for-pub...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2015
  • Latest release: Jan 28, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: JeffMatson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.24ms] Passed 4 tests

Server-side resources used by Turn Down For Publish
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.06 ▼0.83
Dashboard /wp-admin3.31 ▲0.0044.52 ▼4.19
Posts /wp-admin/edit.php3.36 ▲0.0045.67 ▼1.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.92 ▼2.51
Media Library /wp-admin/upload.php3.23 ▲0.0033.23 ▼4.47

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Turn Down For Publish
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.65 ▼0.731.69 ▼0.0641.38 ▲1.86
Dashboard /wp-admin2,208 ▲174.84 ▼0.07111.51 ▲9.8841.19 ▲0.14
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.1938.64 ▼1.4433.73 ▼1.14
Add New Post /wp-admin/post-new.php1,545 ▲1218.64 ▼4.77611.99 ▼64.6452.17 ▼18.19
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0294.47 ▼8.9738.68 ▼7.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/turn-down-for-publish/td4w-publish.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === turn-down-for-publish === )
You can look at the official readme.txt

turn-down-for-publish/td4w-publish.php 92% from 13 tests

The main PHP file in "Turn Down For Publish" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("turn-down-for-publish.php" instead of "td4w-publish.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin18 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP131015
Markdown1203

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin