78% cbxchangelog

Code Review | CBX Changelog

WordPress plugin CBX Changelog scored78%from 54 tests.

About plugin

  • Plugin page: cbxchangelog
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2016
  • Latest release: Nov 14, 2023
  • Number of updates: 42
  • Update frequency: every 61.3 days
  • Top authors: manchumahara (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /5,621 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.59MB] [CPU: ▲1.90ms] 75% from 4 tests

A check of server-side resources used by CBX Changelog
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,523.60ms on /wp-admin/edit.php?post_type=cbxchangelog&page=cbxchangelog-support)
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6141.87 ▲2.91
Dashboard /wp-admin3.93 ▲0.6349.66 ▲0.25
Posts /wp-admin/edit.php3.99 ▲0.6352.47 ▲1.65
Add New Post /wp-admin/post-new.php6.46 ▲0.5794.78 ▲2.79
Media Library /wp-admin/upload.php3.80 ▲0.5645.85 ▲12.80
Add New /wp-admin/post-new.php?post_type=cbxchangelog4.1052.15
Changelogs /wp-admin/edit.php?post_type=cbxchangelog3.9041.27
Helps & Updates /wp-admin/edit.php?post_type=cbxchangelog&page=cbxchangelog-support5.021,523.60
Setting /wp-admin/edit.php?post_type=cbxchangelog&page=cbxchangelog-settings3.8238.81

Server storage [IO: ▲2.45MB] [DB: ▲0.09MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 341 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
cbxchangelog_tools
cbxchangelog_general
db_upgraded
widget_cbxchangelog

Browser metrics Passed 4 tests

An overview of browser requirements for CBX Changelog
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10214.15 ▼0.241.73 ▼0.0931.44 ▼14.77
Dashboard /wp-admin2,232 ▲545.63 ▲0.0390.12 ▼24.6386.53 ▲43.58
Posts /wp-admin/edit.php2,137 ▲371.97 ▼0.0638.44 ▲1.7733.79 ▼0.39
Add New Post /wp-admin/post-new.php1,685 ▲14923.74 ▲0.37650.25 ▼39.6437.18 ▼20.16
Media Library /wp-admin/upload.php1,428 ▲284.14 ▼0.07102.87 ▲4.3471.33 ▲30.20
Add New /wp-admin/post-new.php?post_type=cbxchangelog2,7968.28208.80114.07
Changelogs /wp-admin/edit.php?post_type=cbxchangelog1,0801.9033.1027.07
Helps & Updates /wp-admin/edit.php?post_type=cbxchangelog&page=cbxchangelog-support1,4391.9924.9154.82
Setting /wp-admin/edit.php?post_type=cbxchangelog&page=cbxchangelog-settings1,5473.8070.9177.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • widget_cbxchangelog
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • cbxchangelog_tools
    • widget_recent-comments
    • widget_theysaidso_widget
    • cbxchangelog_general

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cbxchangelog/vendor/michelf/php-markdown/Readme.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cbxchangelog/vendor/michelf/php-markdown/test/integration/PhpMarkdownTest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Michelf\\MarkdownInterface' not found in wp-content/plugins/cbxchangelog/vendor/michelf/php-markdown/Michelf/Markdown.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/cbxchangelog/vendor/michelf/php-markdown/test/unit/MarkdownExtraTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Michelf\\Markdown' not found in wp-content/plugins/cbxchangelog/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6, #7, #8, #9 in cbxchangelog/assets to your readme.txt
  • Requires php: Invalid plugin version format
The official readme.txt is a good inspiration

cbxchangelog/cbxchangelog.php Passed 13 tests

The entry point to "CBX Changelog" version 1.1.3 is a PHP file that has certain tags in its header comment area
86 characters long description:
Easy change log manager for wordpress, use for any product post type or releases notes

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
There were no executable files found in this plugin27,619 lines of code in 238 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript762,9901,38712,324
PHP411,5163,0256,115
Sass339321083,987
XHTML561,02402,503
CSS15161631,948
Markdown31580371
SVG403119
JSON30096
HTML4451368
YAML24065
XML11023

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity37.35
▷ Minimum class complexity1.00
▷ Maximum class complexity142.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods271
▷ Static methods4115.13%
▷ Public methods16560.89%
▷ Protected methods9836.16%
▷ Private methods82.95%
Functions15
▷ Named functions1173.33%
▷ Anonymous functions426.67%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
21 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/vendors/ui-lightness/images/ui-icons_e74c3c_256x240.png4.44KB4.17KB▼ 6.02%
assets/vendors/ui-lightness/images/ui-bg_fine-grain_0_1ABC9C_60x60.png0.20KB0.08KB▼ 57.77%
assets/images/icon_move.png0.22KB0.22KB▼ 0.89%
assets/vendors/ui-lightness/images/ui-bg_diagonal-maze_0_1b2129_10x10.png0.20KB0.08KB▼ 58.91%
assets/vendors/ui-lightness/images/ui-bg_fine-grain_0_ecf0f1_60x60.png0.20KB0.08KB▼ 57.77%