10% gna-whm-manager

Code Review | GNA WHM Manager

WordPress plugin GNA WHM Manager scored 10% from 54 tests.

About plugin

  • Plugin page: gna-whm-manager
  • Plugin version: 0.9.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.2-4.6
  • WordPress version: 6.3.1
  • First release: Jun 2, 2016
  • Latest release: Sep 5, 2016
  • Number of updates: 8
  • Update frequency: every 24.4 days
  • Top authors: chris_dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,334 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_WHM::activate_handler() should not be called statically

Server metrics [RAM: ▼1.72MB] [CPU: ▼45.94ms] Passed 4 tests

An overview of server-side resources used by GNA WHM Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.27 ▼1.199.12 ▼27.38
Dashboard /wp-admin2.28 ▼1.0211.13 ▼44.83
Posts /wp-admin/edit.php2.28 ▼1.0710.55 ▼34.14
Add New Post /wp-admin/post-new.php2.28 ▼3.6011.78 ▼77.39
Media Library /wp-admin/upload.php2.28 ▼0.9511.16 ▼25.37
Add New /wp-admin/post-new.php?post_type=gna_whms2.289.59
All cPanel /wp-admin/edit.php?post_type=gna_whms2.289.57

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
g_whm_configs
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for GNA WHM Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲11513.33 ▼1.054.31 ▲2.5843.57 ▲0.90
Dashboard /wp-admin2,250 ▲595.86 ▲0.9799.57 ▼4.8266.90 ▲24.09
Posts /wp-admin/edit.php2,135 ▲462.03 ▲0.0635.05 ▼1.3832.91 ▼1.73
Add New Post /wp-admin/post-new.php1,561 ▲4723.23 ▲5.56758.63 ▲65.7057.18 ▼1.07
Media Library /wp-admin/upload.php1,434 ▲464.22 ▼0.0394.13 ▼15.8671.60 ▲25.21
Add New /wp-admin/post-new.php?post_type=gna_whms1,5162.5647.9367.93
All cPanel /wp-admin/edit.php?post_type=gna_whms1,1001.9430.9528.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 without warnings or errors
    • > Warning in wp-content/plugins/gna-whm-manager/gna-whm-manager-core.php+97
    Use of undefined constant GNA_CURRENCY_CONVERTER_URL - assumed 'GNA_CURRENCY_CONVERTER_URL' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=gna_whms
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/gna-whm-manager/gna-whm-manager-core.php+97
    Use of undefined constant GNA_CURRENCY_CONVERTER_URL - assumed 'GNA_CURRENCY_CONVERTER_URL' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_WHM_Admin_Menu' not found in wp-content/plugins/gna-whm-manager/admin/gna-whm-manager-admin-settings-menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gna-whm-manager/inc/gna-whm-manager-config.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=gna_whms
    • > Network (severe)
    http://gna_currency_converter_url/assets/images/gna_20x20.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

gna-whm-manager/gna-whm-manager.php Passed 13 tests

The main PHP script in "GNA WHM Manager" version 0.9.3 is automatically included on every request by WordPress
58 characters long description:
Easy to manage multiple WHM accounts similar to the WHMCS.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,603 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP84091,1671,511
CSS15049
JavaScript14343

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity34.71
▷ Minimum class complexity1.00
▷ Maximum class complexity214.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods156
▷ Static methods42.56%
▷ Public methods15398.08%
▷ Protected methods00.00%
▷ Private methods31.92%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
assets/images/gna_20x20.png2.98KB0.33KB▼ 88.89%