84% pmc-edit-lock-marker

Code Review | PMC Edit Lock Marker

WordPress plugin PMC Edit Lock Marker scored84%from 54 tests.

About plugin

  • Plugin page: pmc-edit-lock-marker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5.2
  • WordPress version: 6.3.1
  • First release: Aug 21, 2012
  • Latest release: Nov 24, 2013
  • Number of updates: 7
  • Update frequency: every 65.7 days
  • Top authors: amit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,029 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.11ms] Passed 4 tests

An overview of server-side resources used by PMC Edit Lock Marker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.62 ▲0.16
Dashboard /wp-admin3.31 ▲0.0141.22 ▼4.72
Posts /wp-admin/edit.php3.36 ▲0.0145.20 ▲0.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.43 ▼8.85
Media Library /wp-admin/upload.php3.23 ▲0.0034.52 ▲2.27

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for PMC Edit Lock Marker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.051.49 ▼0.5937.56 ▼12.15
Dashboard /wp-admin2,206 ▲185.87 ▼0.02112.74 ▲4.6543.54 ▲1.64
Posts /wp-admin/edit.php2,100 ▲112.03 ▲0.0443.21 ▲8.8935.46 ▲0.25
Add New Post /wp-admin/post-new.php1,542 ▲2818.33 ▲0.71616.68 ▼66.5453.90 ▼0.37
Media Library /wp-admin/upload.php1,385 ▼34.17 ▼0.0299.73 ▼10.6144.11 ▼2.77

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmc-edit-lock-marker/pmc-edit-lock-marker.php:16

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 errors were detected

Optimizations

Plugin configuration Passed 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
1 plugin tags: post lock

pmc-edit-lock-marker/pmc-edit-lock-marker.php Passed 13 tests

Analyzing the main PHP file in "PMC Edit Lock Marker" version 1.0
100 characters long description:
A plugin to mark the posts on wp-admin/edit.php page which are currently being edited by other users

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected136 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2295781
JavaScript1121852
CSS1173

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods360.00%
▷ Protected methods120.00%
▷ Private methods120.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
PNG images were not found in this plugin