10% publish-control

Code Review | Publish Control

WordPress plugin Publish Control scored 10% from 54 tests.

About plugin

  • Plugin page: publish-control
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 5.8.1
  • First release: Jan 22, 2018
  • Latest release: Jan 22, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: 0 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 504 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/publish-control/publish-control.php+21
    Undefined variable: defaultTypes

Server metrics [RAM: ▲0.03MB] [CPU: ▼144.70ms] Passed 4 tests

A check of server-side resources used by Publish Control
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1433.01 ▲10.90
Dashboard /wp-admin3.08 ▲0.0342.84 ▲0.31
Posts /wp-admin/edit.php3.17 ▲0.0644.84 ▼0.92
Add New Post /wp-admin/post-new.php5.45 ▲0.0193.88 ▼573.05
Media Library /wp-admin/upload.php3.03 ▲0.0230.10 ▼5.12
Publish Control /wp-admin/options-general.php?page=publish-control3.0026.56

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 2 new options
New WordPress options
pubcontrol_message
pubcontrol_posttypes

Browser metrics Passed 4 tests

A check of browser resources used by Publish Control
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,869 ▲27315.95 ▲0.387.84 ▼1.3442.68 ▼2.84
Dashboard /wp-admin3,160 ▲2295.93 ▼0.02133.37 ▼6.19108.33 ▼4.86
Posts /wp-admin/edit.php2,886 ▲1472.70 ▲0.0062.53 ▼3.9989.88 ▲0.89
Add New Post /wp-admin/post-new.php1,512 ▼9418.46 ▼0.38344.66 ▼16.62120.00 ▲13.76
Media Library /wp-admin/upload.php2,026 ▲2195.02 ▲0.01162.73 ▲15.33121.28 ▼3.30
Publish Control /wp-admin/options-general.php?page=publish-control1,2582.2156.2778.37

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/publish-control/publish-control-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/publish-control/publish-control.php:153

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: post, control, publish, workflow, confirm...

publish-control/publish-control.php Passed 13 tests

The main file in "Publish Control" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
55 characters long description:
Provides a confirmation dialog upon content publishing.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected146 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP21450143
CSS2002
JavaScript1041

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin