76% howescape-scout-book-label-print

Code Review | HoweScape ScoutBookLabelPrint

WordPress plugin HoweScape ScoutBookLabelPrint scored76%from 54 tests.

About plugin

  • Plugin page: howescape-scout-b...
  • Plugin version: 1.5.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2019
  • Latest release: Dec 2, 2023
  • Number of updates: 32
  • Update frequency: every 47.8 days
  • Top authors: pthowe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,337 total downloads

Benchmarks

Plugin footprint 81% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲7.50MB] [CPU: ▲36.98ms] 50% from 4 tests

This is a short check of server-side resources used by HoweScape ScoutBookLabelPrint
Please take the time to fix the following items
  • RAM: Total memory usage must be kept under 10MB (currently 11.22MB on /wp-admin/options-general.php?page=hs_ScoutBookLabelPrint_settings)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 7.50MB on /wp-admin/options-general.php?page=hs_ScoutBookLabelPrint_settings)
PageMemory (MB)CPU Time (ms)
Home /11.20 ▲7.7480.22 ▲38.38
Dashboard /wp-admin11.22 ▲7.8788.55 ▲28.60
Posts /wp-admin/edit.php11.22 ▲7.8694.24 ▲51.40
Add New Post /wp-admin/post-new.php12.42 ▲6.54130.73 ▲41.78
Media Library /wp-admin/upload.php11.22 ▲7.9973.22 ▲39.14
HoweScape ScoutBook Label Print /wp-admin/options-general.php?page=hs_ScoutBookLabelPrint_settings11.2275.11

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

Input-output and database impact of this plugin
Please try to fix the following items
  • The filesystem usage should be lower than 25MB (currently using 54.97MB)
Filesystem: 765 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
HoweScape_SBLP_MBRank_XML
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
HoweScape_SBLP_ShowBox
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for HoweScape ScoutBookLabelPrint
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3414.27 ▲0.021.45 ▼0.3736.37 ▼7.90
Dashboard /wp-admin2,208 ▲335.65 ▲0.0595.10 ▼19.9433.11 ▼12.45
Posts /wp-admin/edit.php2,110 ▲132.00 ▲0.0640.75 ▲0.5130.63 ▼3.35
Add New Post /wp-admin/post-new.php1,535 ▲920.84 ▼2.24676.78 ▲18.8152.84 ▼9.80
Media Library /wp-admin/upload.php1,410 ▲164.14 ▼0.0496.97 ▲0.1739.98 ▼2.96
HoweScape ScoutBook Label Print /wp-admin/options-general.php?page=hs_ScoutBookLabelPrint_settings8792.0125.5427.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • HoweScape_SBLP_ShowBox
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • HoweScape_SBLP_MBRank_XML

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
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/howescape-scout-book-label-print/fpdf_merge/ex.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/howescape-scout-book-label-print/hs_ScoutBookLabelPrint.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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 your attention: The official readme.txt might help

howescape-scout-book-label-print/hs_ScoutBookLabelPrint.php 77% from 13 tests

Analyzing the main PHP file in "HoweScape ScoutBookLabelPrint" version 1.5.0
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("howescape-scout-book-label-print.php" instead of "hs_ScoutBookLabelPrint.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin76,510 lines of code in 256 files:
LanguageFilesBlank linesComment linesLines of code
PHP1102,02013,00153,178
SVG13521913820,782
XML51702832,239
CSS31325191
PO File1353588
HTML10023
JavaScript1159

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 4,379)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity400.79
▷ Minimum class complexity1.00
▷ Maximum class complexity4,379.00
Average method complexity9.45
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods899
▷ Static methods11012.24%
▷ Public methods54760.85%
▷ Protected methods31434.93%
▷ Private methods384.23%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants318
▷ Global constants31699.37%
▷ Class constants20.63%
▷ Public constants2100.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
141 PNG files occupy 6.01MB with 1.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Cubscouts/92_100.png5.78KB5.47KB▼ 5.34%
images/Cubscouts/46_100.png1.67KB1.49KB▼ 11.00%
images/Cubscouts/77_100.png4.37KB4.18KB▼ 4.47%
images/Cubscouts/78_100.png4.95KB4.65KB▼ 6.00%
images/Cubscouts/NationalSumertimePackAward-Bear.png55.45KB19.70KB▼ 64.47%