84% limit-revisions

Code Review | Limit Revisions

WordPress plugin Limit Revisions scored 84% from 54 tests.

About plugin

  • Plugin page: limit-revisions
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Dec 11, 2019
  • Latest release: Jul 18, 2021
  • Number of updates: 6
  • Update frequency: every 97.5 days
  • Top authors: carlosmr96 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 938 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.83MB] [CPU: ▼171.50ms] Passed 4 tests

Server-side resources used by Limit Revisions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1339.79 ▲17.22
Dashboard /wp-admin2.83 ▼0.2330.28 ▼18.02
Posts /wp-admin/edit.php2.83 ▼0.2925.26 ▼22.98
Add New Post /wp-admin/post-new.php2.83 ▼2.6127.52 ▼631.29
Media Library /wp-admin/upload.php2.83 ▼0.1822.15 ▼13.69

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Limit Revisions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.88 ▲0.286.46 ▼2.6349.11 ▼5.38
Dashboard /wp-admin2,967 ▲336.08 ▲0.14145.60 ▼15.57111.73 ▲1.33
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0165.75 ▼3.2494.34 ▲0.88
Add New Post /wp-admin/post-new.php1,604 ▲2318.75 ▼1.66383.54 ▲5.14123.56 ▼5.34
Media Library /wp-admin/upload.php1,810 ▲35.05 ▼0.00158.53 ▲1.84131.34 ▲8.39

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
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/limit-revisions/limit-wordpress-revisions.php+28
    Trying to access array offset on value of type bool

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 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-revisions/limit-wordpress-revisions.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: limit, revisions, content, revision

limit-revisions/limit-wordpress-revisions.php 85% from 13 tests

Analyzing the main PHP file in "Limit Revisions" version 1.0.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("limit-revisions.php" instead of "limit-wordpress-revisions.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin112 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File2121271
PHP222341

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.PNG4.82KB3.31KB▼ 31.35%
assets/screenshot-1.PNG21.25KB10.86KB▼ 48.88%