84% limit-revision-publishing

Code Review | Limit Revision Publishing

WordPress plugin Limit Revision Publishing scored84%from 54 tests.

About plugin

  • Plugin page: limit-revision-pu...
  • Plugin version: 1.1.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.2
  • WordPress version: 6.3.1
  • First release: Aug 19, 2016
  • Latest release: Apr 25, 2023
  • Number of updates: 25
  • Update frequency: every 97.8 days
  • Top authors: figureone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.18MB] [CPU: ▼5.87ms] Passed 4 tests

An overview of server-side resources used by Limit Revision Publishing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.52 ▼5.05
Dashboard /wp-admin3.48 ▲0.1851.79 ▼0.77
Posts /wp-admin/edit.php3.60 ▲0.2449.01 ▲1.02
Add New Post /wp-admin/post-new.php6.06 ▲0.1887.04 ▼18.66
Media Library /wp-admin/upload.php3.40 ▲0.1741.91 ▲5.97
Limit Revision Publishing /wp-admin/options-general.php?page=limit-revision-publishing3.4136.23

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 98 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Limit Revision Publishing: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.24 ▼1.422.32 ▲0.0345.09 ▲1.99
Dashboard /wp-admin2,213 ▲284.87 ▼0.05100.43 ▼11.8239.26 ▼5.02
Posts /wp-admin/edit.php2,141 ▲492.01 ▲0.0539.00 ▲0.2738.55 ▲2.44
Add New Post /wp-admin/post-new.php1,517 ▼217.76 ▼5.37693.22 ▼15.0669.49 ▼8.61
Media Library /wp-admin/upload.php1,392 ▲74.12 ▼0.08115.88 ▼25.9948.46 ▼5.14
Limit Revision Publishing /wp-admin/options-general.php?page=limit-revision-publishing1,7396.02146.6671.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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
There were no browser issues found

Optimizations

Plugin configuration 96% from 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: limit, capability, revision, permissions, workflow...

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

"Limit Revision Publishing" version 1.1.10'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: The principal plugin file should be the same as 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 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 detected11,371 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript672,5917989,810
PHP7168259809
CSS3620457
Markdown3700166
YAML566129

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
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
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.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 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-3.png364.66KB168.50KB▼ 53.79%
images/screenshot-4.png234.70KB104.21KB▼ 55.60%
images/screenshot-2.png238.82KB105.89KB▼ 55.66%
images/screenshot-5.png254.89KB113.50KB▼ 55.47%
images/screenshot-7.png211.94KB96.72KB▼ 54.36%