84% lh-locked-post-status

Code Review | LH Locked Post Status

WordPress plugin LH Locked Post Status scored 84% from 54 tests.

About plugin

  • Plugin page: lh-locked-post-st...
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Feb 19, 2015
  • Latest release: Jan 23, 2017
  • Number of updates: 7
  • Update frequency: every 127.7 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 752 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
Install script ran successfully

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

An overview of server-side resources used by LH Locked Post Status
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.34 ▼4.07
Dashboard /wp-admin3.32 ▲0.0246.17 ▼0.22
Posts /wp-admin/edit.php3.37 ▲0.0251.64 ▲5.38
Add New Post /wp-admin/post-new.php5.91 ▲0.02100.41 ▼0.74
Media Library /wp-admin/upload.php3.25 ▲0.0236.12 ▼1.74

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

LH Locked Post Status: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.45 ▲0.081.81 ▲0.0641.75 ▼0.07
Dashboard /wp-admin2,209 ▲214.86 ▼0.05106.62 ▲0.9442.72 ▲1.36
Posts /wp-admin/edit.php2,119 ▲302.05 ▲0.0540.07 ▲1.0335.03 ▲0.95
Add New Post /wp-admin/post-new.php1,514 ▼1417.80 ▼5.30644.13 ▲8.1250.34 ▼3.92
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0594.51 ▼15.0442.41 ▼5.70

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lh-locked-post-status/includes/lh-custom-post-status-class.php:181

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: pages, workflow, admin, posts, private...

lh-locked-post-status/lh-locked-post-status.php Passed 13 tests

The entry point to "LH Locked Post Status" version 1.02 is a PHP file that has certain tags in its header comment area
76 characters long description:
Creates two additional post statuses of Publicly Locked and Privately Locked

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected110 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP210718110

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected