83% gp-hub-driver-widget

Code Review | GP Hub - Driver Widget

WordPress plugin GP Hub - Driver Widget scored83%from 54 tests.

About plugin

  • Plugin page: gp-hub-driver-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2014
  • Latest release: Mar 31, 2015
  • Number of updates: 16
  • Update frequency: every 15.0 days
  • Top authors: riseoflex88 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /1,944 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.04MB] [CPU: ▼6.03ms] Passed 4 tests

A check of server-side resources used by GP Hub - Driver Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.67 ▲0.29
Dashboard /wp-admin3.35 ▲0.0147.39 ▼14.85
Posts /wp-admin/edit.php3.40 ▲0.0550.27 ▼3.09
Add New Post /wp-admin/post-new.php5.93 ▲0.0595.24 ▼6.47
Media Library /wp-admin/upload.php3.28 ▲0.0538.18 ▲2.93

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_gphub419231_driver_widget
widget_gphub419231_standings_widget

Browser metrics Passed 4 tests

A check of browser resources used by GP Hub - Driver Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲16013.69 ▼0.697.42 ▲5.8838.86 ▼0.52
Dashboard /wp-admin2,200 ▲156.00 ▲0.14100.86 ▼1.3540.50 ▼2.19
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0540.36 ▲0.4935.88 ▼1.09
Add New Post /wp-admin/post-new.php1,533 ▼1023.08 ▲4.82635.38 ▼18.6451.03 ▼4.84
Media Library /wp-admin/upload.php1,391 ▲94.18 ▼0.0695.69 ▼4.5642.73 ▲0.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_gphub419231_standings_widget
    • db_upgraded
    • widget_gphub419231_driver_widget

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/gp-hub-driver-widget/modules/standings-combo.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/gp-hub-driver-widget/modules/single-driver.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/gp-hub-driver-widget/gphub-driver-widget.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === gp-hub-driver-widget === )
  • Screenshots: These screenshots lack descriptions #5, #6 in gp-hub-driver-widget/assets to your readme.txt
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt might help

gp-hub-driver-widget/gphub-driver-widget.php 92% from 13 tests

The main PHP file in "GP Hub - Driver Widget" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gp-hub-driver-widget.php" instead of "gphub-driver-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected214 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35525213
JavaScript1171

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/gphub-logo-colored.png2.69KB1.96KB▼ 27.08%