68% code-revisions

Code Review | Code Revisions

WordPress plugin Code Revisions scored68%from 54 tests.

About plugin

  • Plugin page: code-revisions
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.7
  • WordPress version: 6.3.1
  • First release: Aug 27, 2013
  • Latest release: Sep 30, 2013
  • Number of updates: 14
  • Update frequency: every 2.5 days
  • Top authors: a.hoereth (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

30+ active /3,488 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.45ms] Passed 4 tests

An overview of server-side resources used by Code Revisions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0853.91 ▲10.51
Dashboard /wp-admin3.37 ▲0.0753.37 ▲1.74
Posts /wp-admin/edit.php3.42 ▲0.0752.92 ▼0.80
Add New Post /wp-admin/post-new.php5.95 ▲0.0788.77 ▼8.26
Media Library /wp-admin/upload.php3.30 ▲0.0742.80 ▲5.54

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Code Revisions: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.36 ▲0.001.98 ▲0.3142.20 ▼5.37
Dashboard /wp-admin2,195 ▲215.62 ▼0.0884.53 ▼37.3640.02 ▼21.63
Posts /wp-admin/edit.php2,100 ▲31.96 ▼0.0035.33 ▼0.5234.97 ▼0.30
Add New Post /wp-admin/post-new.php1,528 ▼023.17 ▲0.16662.70 ▼26.8353.46 ▼24.74
Media Library /wp-admin/upload.php1,397 ▼34.25 ▲0.0999.68 ▲6.2342.50 ▲0.81

Uninstaller [IO: ▲0.05MB] [DB: ▲0.00MB] 50% 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
  • This plugin has failed uninstalling correctly, leaving 13 files (0.05MB) in the plugin directory
    • (new file) inc/class-code-revisions.php
    • (new file) css/editors.css
    • (new file) css/viewer.css
    • (new file) js/editors.js
    • (new file) css/viewer.min.css
    • (new file) css/editors.min.css
    • (new file) inc/metabox.php
    • (new file) code-revisions.php
    • (new file) inc/class-code-revisions-editors.php
    • (new file) inc/plugged.php
    • ...
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/code-revisions/inc/metabox.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/code-revisions/code-revisions.php:32
    • > PHP Warning
      Use of undefined constant CODE_REVISIONS_DIR - assumed 'CODE_REVISIONS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/code-revisions/inc/metabox.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

code-revisions/code-revisions.php Passed 13 tests

The main PHP file in "Code Revisions" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
70 characters long description:
Brings native code revisions to the WordPress integrated code editors.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected493 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP5134316421
JavaScript2132047
CSS451125

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity41.50
▷ Minimum class complexity38.00
▷ Maximum class complexity45.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods1770.83%
▷ Protected methods00.00%
▷ Private methods729.17%
Functions2
▷ Named functions2100.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 images were found in this plugin