90% wp-unpublish

Code Review | WP Unpublish

WordPress plugin WP Unpublish scored90%from 54 tests.

About plugin

  • Plugin page: wp-unpublish
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.5-5.0
  • WordPress version: 6.3.1
  • First release: Apr 24, 2018
  • Latest release: Feb 21, 2020
  • Number of updates: 14
  • Update frequency: every 47.7 days
  • Top authors: frogerme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,488 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.01MB] [CPU: ▼6.72ms] Passed 4 tests

A check of server-side resources used by WP Unpublish
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.28 ▼1.57
Dashboard /wp-admin3.33 ▼0.0247.53 ▼17.46
Posts /wp-admin/edit.php3.38 ▲0.0254.67 ▲2.97
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.20 ▼10.17
Media Library /wp-admin/upload.php3.25 ▲0.0237.49 ▲2.33

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

WP Unpublish: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.24 ▲0.121.72 ▲0.0539.97 ▼4.49
Dashboard /wp-admin2,198 ▲305.62 ▲0.1089.42 ▲1.5440.47 ▼6.87
Posts /wp-admin/edit.php2,105 ▲52.01 ▼0.0136.77 ▼4.5830.99 ▼7.75
Add New Post /wp-admin/post-new.php1,542 ▲1623.23 ▼0.01647.28 ▼50.2751.06 ▼9.09
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.0399.14 ▼11.4847.33 ▼0.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4 in wp-unpublish/assets to your readme.txt
Please take inspiration from this readme.txt

wp-unpublish/wp-unpublish.php Passed 13 tests

The entry point to "WP Unpublish" version 1.1.1 is a PHP file that has certain tags in its header comment area
50 characters long description:
Adds the post status Unpublished (Classic Editor).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected192 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3312086
JavaScript214137
PO File19936
Markdown112033

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin