67% comicbookmanagementsystem

Code Review | Comic Book Management System

WordPress plugin Comic Book Management System scored67%from 54 tests.

About plugin

  • Plugin page: comicbookmanageme...
  • Plugin version: 4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 4, 2019
  • Latest release: Apr 15, 2023
  • Number of updates: 55
  • Update frequency: every 25.7 days
  • Top authors: inksplat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,195 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼1.49ms] Passed 4 tests

Analyzing server-side resources used by Comic Book Management System
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1537.36 ▲1.15
Dashboard /wp-admin3.45 ▲0.1572.35 ▲24.14
Posts /wp-admin/edit.php3.56 ▲0.2147.29 ▼1.37
Add New Post /wp-admin/post-new.php6.05 ▲0.1782.56 ▼7.70
Media Library /wp-admin/upload.php3.37 ▲0.1534.82 ▲1.95

Server storage [IO: ▲2.19MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • Illegal file modification found: 2 files (0.00KB) outside of "wp-content/plugins/comicbookmanagementsystem/" and "wp-content/uploads/"
    • (new file) wp-content/cbms_Covers/.empty
    • (new file) wp-content/cbms_CoversNow/.empty
Filesystem: 53 new files
Database: 2 new tables, 7 new options
New tables
wp_cbms_books
wp_cbms_availablenow
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
cbms_plugin_version
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Comic Book Management System
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.57 ▼0.809.75 ▲8.0237.01 ▼4.03
Dashboard /wp-admin2,213 ▲255.80 ▲0.92108.71 ▲7.4171.83 ▲28.81
Posts /wp-admin/edit.php2,111 ▲222.01 ▼0.0235.92 ▲0.2231.06 ▼5.16
Add New Post /wp-admin/post-new.php1,539 ▲423.44 ▲0.19754.15 ▲158.3450.46 ▼9.81
Media Library /wp-admin/upload.php1,407 ▲164.24 ▲0.0299.47 ▼3.7271.39 ▲27.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_cbms_books
    • wp_cbms_availablenow
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • cbms_plugin_version
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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
Even though no errors were found, 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/comicbookmanagementsystem/includes/cbms_footer.php
  • 30× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require(): Failed opening required 'COMIC_BOOK_MANAGEMENT_SYSTEM__PLUGIN_DIR/includes/cbms_header.php' (include_path='.:/usr/share/php') in wp-content/plugins/comicbookmanagementsystem/includes/cbms_listall.php on line 2
    • > PHP Warning
      Use of undefined constant COMIC_BOOK_MANAGEMENT_SYSTEM__PLUGIN_DIR - assumed 'COMIC_BOOK_MANAGEMENT_SYSTEM__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/comicbookmanagementsystem/includes/cbms_admin.php on line 2
    • > PHP Warning
      Use of undefined constant COMIC_BOOK_MANAGEMENT_SYSTEM__PLUGIN_DIR - assumed 'COMIC_BOOK_MANAGEMENT_SYSTEM__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/comicbookmanagementsystem/includes/cbms_addavailablebook.php on line 2
    • > PHP Warning
      require(COMIC_BOOK_MANAGEMENT_SYSTEM__PLUGIN_DIR/includes/cbms_header.php): failed to open stream: No such file or directory in wp-content/plugins/comicbookmanagementsystem/includes/cbms_admin_page.php on line 2
    • > PHP Warning
      Use of undefined constant COMIC_BOOK_MANAGEMENT_SYSTEM__PLUGIN_DIR - assumed 'COMIC_BOOK_MANAGEMENT_SYSTEM__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/comicbookmanagementsystem/includes/cbms_addbook.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/comicbookmanagementsystem/class.comicbookmanagementsystem.php:509
    • > PHP Warning
      require(COMIC_BOOK_MANAGEMENT_SYSTEM__PLUGIN_DIR/includes/cbms_header.php): failed to open stream: No such file or directory in wp-content/plugins/comicbookmanagementsystem/includes/cbms_listallavailablenow.php on line 2
    • > PHP Warning
      require(COMIC_BOOK_MANAGEMENT_SYSTEM__PLUGIN_DIR/includes/cbms_header.php): failed to open stream: No such file or directory in wp-content/plugins/comicbookmanagementsystem/includes/cbms_addbook.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'COMIC_BOOK_MANAGEMENT_SYSTEM__PLUGIN_DIR/includes/cbms_header.php' (include_path='.:/usr/share/php') in wp-content/plugins/comicbookmanagementsystem/includes/cbms_admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/comicbookmanagementsystem/includes/cbms_preorder.php:7

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 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: The official readme.txt is a good inspiration

comicbookmanagementsystem/ComicBookManagementSystem.php 77% from 13 tests

Analyzing the main PHP file in "Comic Book Management System" version 4.1
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("comicbookmanagementsystem.php" instead of "ComicBookManagementSystem.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 176 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin7,211 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,3831,0044,285
PHP18289531,918
CSS612820573
Sass2275262
LESS1115152
SVG11013
Ruby1208

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity33.67
▷ Minimum class complexity27.00
▷ Maximum class complexity44.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods41
▷ Static methods1126.83%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 1.85MB with 0.91MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon.png0.96KB0.90KB▼ 6.98%
assets/screenshot-5.png380.70KB98.91KB▼ 74.02%
img/logo.png66.57KB23.85KB▼ 64.17%
assets/banner-772x250.png86.32KB43.63KB▼ 49.45%
assets/banner-1544x500.png263.35KB131.61KB▼ 50.02%