84% wp-revisions-limit

Code Review | WP Revisions Limit

WordPress plugin WP Revisions Limit scored84%from 54 tests.

About plugin

  • Plugin page: wp-revisions-limit
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.6.1
  • WordPress version: 6.3.1
  • First release: Mar 20, 2015
  • Latest release: Nov 1, 2016
  • Number of updates: 27
  • Update frequency: every 21.9 days
  • Top authors: barragan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /8,046 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.75ms] Passed 4 tests

An overview of server-side resources used by WP Revisions Limit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.51 ▼2.04
Dashboard /wp-admin3.37 ▲0.0245.30 ▼11.12
Posts /wp-admin/edit.php3.48 ▲0.1249.05 ▼0.71
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.98 ▼13.13
Media Library /wp-admin/upload.php3.29 ▲0.0636.84 ▲2.86
Revisions Limit /wp-admin/options-general.php?page=wp-revisions-limit3.2630.45

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Revisions Limit
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.60 ▼0.781.83 ▲0.0340.13 ▼3.61
Dashboard /wp-admin2,210 ▲224.89 ▲0.02109.35 ▲2.8737.88 ▼8.43
Posts /wp-admin/edit.php2,090 ▲12.02 ▼0.0339.69 ▲0.2133.91 ▼2.75
Add New Post /wp-admin/post-new.php1,536 ▲1723.08 ▼0.05569.66 ▼83.1857.01 ▲9.03
Media Library /wp-admin/upload.php1,389 ▼24.21 ▲0.0599.61 ▲1.2244.34 ▲1.19
Revisions Limit /wp-admin/options-general.php?page=wp-revisions-limit7971.7626.1326.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-revisions-limit/admin/partials/wp-revisions-limit-admin-display.php:14

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

wp-revisions-limit/wp-revisions-limit.php 92% from 13 tests

The main file in "WP Revisions Limit" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")

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 plugin283 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10149476283

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.83
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods31
▷ Static methods412.90%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin