83% gbi-to-print

Code Review | GBI To Print

WordPress plugin GBI To Print scored83%from 54 tests.

About plugin

  • Plugin page: gbi-to-print
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Jul 11, 2017
  • Latest release: Jul 11, 2017
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: garber (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /862 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼11.65ms] Passed 4 tests

Analyzing server-side resources used by GBI To Print
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.00 ▲0.47
Dashboard /wp-admin3.34 ▲0.0446.92 ▼1.68
Posts /wp-admin/edit.php3.39 ▲0.0346.64 ▼22.36
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.53 ▼23.03
Media Library /wp-admin/upload.php3.26 ▲0.0338.55 ▲5.08
GBI To Print Settings /wp-admin/options-general.php?page=gbi_toprint3.2341.62

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
gbi_toprint_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for GBI To Print
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16713.86 ▼0.895.31 ▲3.7141.51 ▼0.45
Dashboard /wp-admin2,213 ▲425.86 ▲0.00104.38 ▼6.2940.13 ▼11.35
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0535.27 ▼5.8135.54 ▼3.42
Add New Post /wp-admin/post-new.php1,536 ▲322.99 ▼0.17641.08 ▲40.3153.37 ▼4.15
Media Library /wp-admin/upload.php1,395 ▲74.17 ▼0.0694.04 ▼5.8240.68 ▼1.30
GBI To Print Settings /wp-admin/options-general.php?page=gbi_toprint8132.0324.8426.77

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • gbi_toprint_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gbi-to-print/options.php:4

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid url: "paypal.me/gelsindolor"
Please take inspiration from this readme.txt

gbi-to-print/gbitoprint.php 85% from 13 tests

The principal PHP file in "GBI To Print" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gbi-to-print.php" instead of "gbitoprint.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected244 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25642161
PO File1111161
JavaScript117122

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin