10% disable-post-locking

Code Review | Disable Post Locking

WordPress plugin Disable Post Locking scored10%from 54 tests.

About plugin

  • Plugin page: disable-post-locking
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 19, 2013
  • Latest release: Sep 20, 2013
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: bpetty (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /1,781 total downloads

Benchmarks

Plugin footprint 58% 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
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/disable-post-locking/plugin.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; Plugin_DisablePostLocking has a deprecated constructor

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

This is a short check of server-side resources used by Disable Post Locking
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.45 ▲0.63
Dashboard /wp-admin3.31 ▼0.0451.27 ▼13.38
Posts /wp-admin/edit.php3.36 ▲0.0049.57 ▼4.50
Add New Post /wp-admin/post-new.php5.89 ▼0.0084.03 ▼21.94
Media Library /wp-admin/upload.php3.23 ▲0.0037.85 ▲3.03

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

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

Browser metrics Passed 4 tests

Disable Post Locking: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.181.86 ▲0.1743.48 ▲2.25
Dashboard /wp-admin2,198 ▲245.67 ▲0.0694.01 ▼3.8643.05 ▲4.07
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.0134.02 ▼5.4035.55 ▼1.73
Add New Post /wp-admin/post-new.php1,544 ▼123.16 ▼0.08679.07 ▼20.5570.01 ▲19.45
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.04101.41 ▼10.7144.32 ▼1.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/disable-post-locking/plugin.php:13

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 96% from 29 tests

readme.txt Passed 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
3 plugin tags: lock, post locking, post lock

disable-post-locking/plugin.php 92% from 13 tests

"Disable Post Locking" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("disable-post-locking.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected17 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods3100.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