89% better-revisions

Code Review | Better Revisions

WordPress plugin Better Revisions scored89%from 54 tests.

About plugin

  • Plugin page: better-revisions
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.0
  • WordPress version: 6.3.1
  • First release: Nov 9, 2016
  • Latest release: Apr 14, 2023
  • Number of updates: 25
  • Update frequency: every 93.8 days
  • Top authors: slehner (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /7,391 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.07MB] [CPU: ▼5.76ms] Passed 4 tests

This is a short check of server-side resources used by Better Revisions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0834.91 ▼2.39
Dashboard /wp-admin3.38 ▲0.0744.07 ▼5.64
Posts /wp-admin/edit.php3.43 ▲0.0747.58 ▼1.36
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.06 ▼13.66
Media Library /wp-admin/upload.php3.30 ▲0.0733.39 ▲3.24

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Better Revisions: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.63 ▲0.271.70 ▲0.1240.24 ▲2.19
Dashboard /wp-admin2,203 ▲155.84 ▼0.0298.93 ▼0.2036.59 ▼8.02
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0440.35 ▲4.0938.00 ▲1.33
Add New Post /wp-admin/post-new.php1,519 ▼017.47 ▼5.73684.74 ▲55.0361.40 ▲9.97
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.0195.48 ▼7.2143.41 ▼0.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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)
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

better-revisions/better-revisions.php 92% from 13 tests

The primary PHP file in "Better Revisions" version 0.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 169 characters long)

Code Analysis Passed 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
Good job! No executable or dangerous file extensions detected457 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP242136334
JavaScript110177
PO File1151546

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity56.00
▷ Minimum class complexity56.00
▷ Maximum class complexity56.00
Average method complexity4.93
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1071.43%
▷ Protected methods00.00%
▷ Private methods428.57%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin