94% limit-revision-publishing

Code Review | Limit Revision Publishing

WordPress plugin Limit Revision Publishing scored 94% from 54 tests.

About plugin

  • Plugin page: limit-revision-pu...
  • Plugin version: 1.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.9
  • WordPress version: 5.9.2
  • First release: Aug 19, 2016
  • Latest release: Jan 26, 2022
  • Number of updates: 20
  • Update frequency: every 99.6 days
  • Top authors: figureone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 957 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼297.44ms] Passed 4 tests

Analyzing server-side resources used by Limit Revision Publishing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0558.74 ▼1.52
Dashboard /wp-admin3.47 ▲0.0635.08 ▼0.34
Posts /wp-admin/edit.php3.69 ▲0.0638.58 ▲1.19
Add New Post /wp-admin/post-new.php6.93 ▼0.0496.79 ▼1,189.10
Media Library /wp-admin/upload.php3.35 ▲0.0626.58 ▲1.82
Limit Revision Publishing /wp-admin/options-general.php?page=limit-revision-publishing3.3624.93

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 74 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Limit Revision Publishing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4616.26 ▲0.605.57 ▼0.263.22 ▲0.24
Dashboard /wp-admin2,897 ▲466.13 ▼0.05123.07 ▼18.05223.71 ▲58.96
Posts /wp-admin/edit.php2,735 ▲443.23 ▼0.1363.35 ▼4.95139.73 ▼20.74
Add New Post /wp-admin/post-new.php1,714 ▲2420.76 ▲0.23446.53 ▼39.48180.90 ▼0.97
Media Library /wp-admin/upload.php1,703 ▲85.54 ▲0.02153.45 ▲4.84222.21 ▲30.05
Limit Revision Publishing /wp-admin/options-general.php?page=limit-revision-publishing2,1927.13170.31253.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/limit-revision-publishing/lib/class-lrp-controller.php:14

User-side errors Passed 1 test

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


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: revision, capability, publish, limit, permissions...

limit-revision-publishing/plugin.php 92% from 13 tests

"Limit Revision Publishing" version 1.1.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("limit-revision-publishing.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin10,549 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity18.67
▷ Minimum class complexity8.00
▷ Maximum class complexity44.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 1.73MB with 0.95MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/screenshot-2.png238.82KB105.89KB▼ 55.66%
images/screenshot-5.png254.89KB113.50KB▼ 55.47%
images/screenshot-3.png364.66KB168.50KB▼ 53.79%
images/screenshot-1.png238.32KB111.23KB▼ 53.33%
images/screenshot-4.png234.70KB104.21KB▼ 55.60%