84% unpublish

Code Review | Unpublish

WordPress plugin Unpublish scored84%from 54 tests.

About plugin

  • Plugin page: unpublish
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 10, 2018
  • Latest release: Aug 10, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: dougwollison (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /9,158 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.49ms] Passed 4 tests

Analyzing server-side resources used by Unpublish
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.70 ▲1.53
Dashboard /wp-admin3.31 ▲0.0143.36 ▼2.49
Posts /wp-admin/edit.php3.36 ▲0.0145.77 ▼3.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.91 ▼4.69
Media Library /wp-admin/upload.php3.23 ▲0.0136.91 ▼3.77

Server storage [IO: ▲0.04MB] [DB: ▲0.61MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Unpublish
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5713.23 ▼1.151.78 ▼0.0654.25 ▲14.42
Dashboard /wp-admin2,209 ▲604.87 ▼0.8098.18 ▲2.7536.88 ▼3.54
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0336.08 ▼3.6231.87 ▼3.06
Add New Post /wp-admin/post-new.php1,517 ▼1617.58 ▼5.68683.33 ▲15.6155.87 ▲6.30
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0692.00 ▼5.0443.24 ▼3.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • 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 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unpublish/unpublish.php:30

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: unpublish

unpublish/unpublish.php Passed 13 tests

The principal PHP file in "Unpublish" v. 1.0.0 is loaded by WordPress automatically on each request
107 characters long description:
Simply adds a one-click "Unpublish" button to the Editor screen, which switches the post to Pending status.

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 plugin28 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP163326
Markdown1002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code1.75
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin