74% companion-revision-manager

Code Review | Companion Revision Manager - Revision Control

WordPress plugin Companion Revision Manager - Revision Control scored74%from 54 tests.

About plugin

  • Plugin page: companion-revisio...
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 10, 2017
  • Latest release: Mar 31, 2023
  • Number of updates: 40
  • Update frequency: every 51.5 days
  • Top authors: Papin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /9,755 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.84ms] Passed 4 tests

Server-side resources used by Companion Revision Manager - Revision Control
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0447.90 ▲7.93
Dashboard /wp-admin3.34 ▲0.0451.05 ▲2.35
Posts /wp-admin/edit.php3.40 ▲0.0446.77 ▼3.25
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.30 ▼4.34
Media Library /wp-admin/upload.php3.27 ▲0.0440.00 ▲1.89
Revisions /wp-admin/tools.php?page=crm-settings3.2434.59

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: 1 new table, 7 new options
New tables
wp_revision_control
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
crm_db_version
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Companion Revision Manager - Revision Control
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲5814.34 ▼0.271.72 ▼0.1142.98 ▲0.74
Dashboard /wp-admin2,199 ▲295.63 ▼0.0785.84 ▼13.5635.48 ▼6.37
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0239.68 ▲3.5942.68 ▲2.10
Add New Post /wp-admin/post-new.php1,531 ▲323.20 ▲0.15690.88 ▼56.1753.29 ▼20.93
Media Library /wp-admin/upload.php1,404 ▲74.17 ▼0.04106.56 ▲0.2644.50 ▼5.50
Revisions /wp-admin/tools.php?page=crm-settings8332.0227.8923.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_revision_control
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • crm_db_version
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/companion-revision-manager/companion-revision-manger.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt is a good inspiration

companion-revision-manager/companion-revision-manger.php 92% from 13 tests

The primary PHP file in "Companion Revision Manager - Revision Control" version 1.6.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("companion-revision-manager.php" instead of "companion-revision-manger.php")

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
There were no executable files found in this plugin219 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP110057219

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin