84% post-revisions-columns

Code Review | Post revisions columns

WordPress plugin Post revisions columns scored84%from 54 tests.

About plugin

  • Plugin page: post-revisions-co...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2014
  • Latest release: Apr 9, 2014
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: cmgrady (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /880 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Post revisions columns
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.53 ▼4.37
Dashboard /wp-admin3.11 ▼0.1936.94 ▼12.10
Posts /wp-admin/edit.php3.25 ▼0.1135.30 ▼10.79
Add New Post /wp-admin/post-new.php5.49 ▼0.4073.34 ▼23.44
Media Library /wp-admin/upload.php3.20 ▼0.0327.59 ▼10.31

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Post revisions columns
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.14 ▼1.261.89 ▼0.4243.95 ▲0.67
Dashboard /wp-admin2,213 ▲254.84 ▼1.05102.56 ▼1.7741.30 ▼6.30
Posts /wp-admin/edit.php2,123 ▲372.02 ▲0.0238.04 ▼1.2134.92 ▲2.56
Add New Post /wp-admin/post-new.php1,518 ▲417.48 ▲0.02652.03 ▼79.8655.34 ▲2.44
Media Library /wp-admin/upload.php1,389 ▲74.23 ▼0.0296.67 ▼15.8443.04 ▼3.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/post-revisions-columns/main.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: columns, editphp, post-listings, revisions, custom-columns

post-revisions-columns/main.php 92% from 13 tests

"Post revisions columns" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("post-revisions-columns.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin81 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3502575
CSS24146
JavaScript1240

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG files were detected