89% simple-revision-control

Code Review | Simple Revision Control

WordPress plugin Simple Revision Control scored89%from 54 tests.

About plugin

  • Plugin page: simple-revision-c...
  • Plugin version: 2.1.3
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 9, 2013
  • Latest release: Nov 20, 2023
  • Number of updates: 45
  • Update frequency: every 83.5 days
  • Top authors: iworks (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

600+ active /7,416 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼4.57ms] Passed 4 tests

This is a short check of server-side resources used by Simple Revision Control
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.07 ▲2.43
Dashboard /wp-admin3.31 ▼0.0446.39 ▼11.92
Posts /wp-admin/edit.php3.36 ▲0.0042.65 ▼5.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.91 ▲0.25
Media Library /wp-admin/upload.php3.23 ▲0.0033.42 ▼0.76

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Revision Control
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.67 ▲0.532.04 ▲0.2845.43 ▲6.95
Dashboard /wp-admin2,198 ▲245.58 ▼0.0196.82 ▼4.1840.67 ▼1.91
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0634.64 ▼7.8833.78 ▼2.67
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▼0.03589.74 ▼7.9553.02 ▲7.08
Media Library /wp-admin/upload.php1,400 ▲64.21 ▲0.0399.50 ▼0.7540.01 ▼2.37

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 were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: Please take inspiration from this readme.txt

simple-revision-control/simple-revision-control.php Passed 13 tests

This is the main PHP file of "Simple Revision Control" version 2.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
104 characters long description:
Simple Revision Control is a plugin which gives the user simple control over the Revision functionality.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin3,585 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP111737532,564
JavaScript754103420
SVG200282
CSS6239181
Sass180138

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 193)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity121.75
▷ Minimum class complexity2.00
▷ Maximum class complexity392.00
Average method complexity5.78
▷ Minimum method complexity1.00
▷ Maximum method complexity193.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods101
▷ Static methods10.99%
▷ Public methods6665.35%
▷ Protected methods43.96%
▷ Private methods3130.69%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
6 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/iworks/options/assets/styles/images/ui-icons_777620_256x240.png3.50KB3.82KB0.00%
includes/iworks/options/assets/styles/images/ui-icons_444444_256x240.png3.50KB3.83KB0.00%
includes/iworks/options/assets/styles/images/ui-icons_cc0000_256x240.png3.51KB3.84KB0.00%
includes/iworks/options/assets/styles/images/ui-icons_ffffff_256x240.png3.54KB3.86KB0.00%
includes/iworks/options/assets/styles/images/ui-icons_777777_256x240.png3.46KB3.80KB0.00%