10% client-power-tools

Code Review | Client Power Tools

WordPress plugin Client Power Tools scored10%from 54 tests.

About plugin

  • Plugin page: client-power-tools
  • Plugin version: 1.8.1
  • PHP compatiblity: 7.3.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Oct 2, 2020
  • Latest release: Oct 13, 2023
  • Number of updates: 98
  • Update frequency: every 11.3 days
  • Top authors: samglover (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,872 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/client-power-tools/client-power-tools.php+138
    Undefined variable: wp_error

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.52ms] Passed 4 tests

An overview of server-side resources used by Client Power Tools
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.01 ▼1.43
Dashboard /wp-admin3.50 ▲0.1945.80 ▼0.71
Posts /wp-admin/edit.php3.58 ▲0.2250.67 ▲2.72
Add New Post /wp-admin/post-new.php6.09 ▲0.2193.33 ▼2.07
Media Library /wp-admin/upload.php3.39 ▲0.1635.70 ▼5.86

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 94 new files
Database: no new tables, 21 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
cpt_default_client_status
cpt_status_update_req_freq
cpt_client_statuses
theysaidso_admin_options
widget_recent-posts
cpt_project_statuses
cpt_projects_label
...

Browser metrics Passed 4 tests

A check of browser resources used by Client Power Tools
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲20313.54 ▼0.768.93 ▲7.4341.35 ▲0.14
Dashboard /wp-admin2,245 ▲685.63 ▲0.0382.75 ▼3.0473.29 ▲32.02
Posts /wp-admin/edit.php2,168 ▲682.08 ▲0.0539.61 ▲3.9034.93 ▲0.81
Add New Post /wp-admin/post-new.php1,577 ▲5123.14 ▼0.19636.99 ▼39.3134.31 ▼16.39
Media Library /wp-admin/upload.php1,462 ▲654.20 ▼0.0294.25 ▼8.0667.89 ▲22.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 21 options in the database
    • cpt_module_projects
    • cpt_client_statuses
    • cpt_status_update_req_freq
    • cpt_default_client_status
    • can_compress_scripts
    • widget_recent-posts
    • cpt_module_status_update_req_button
    • cpt_status_update_req_notice_email
    • cpt_client_dashboard_page_selection
    • cpt_new_client_email_message_body
    • ...

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 27× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Client_Power_Tools\\Core\\Includes\\WP_List_Table' not found in wp-content/plugins/client-power-tools/admin/cpt-client-manager-table.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Client_Power_Tools\\Core\\Admin\\esc_url() in wp-content/plugins/client-power-tools/admin/cpt-new-project-type-form.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Client_Power_Tools\\Core\\Includes\\WP_List_Table' not found in wp-content/plugins/client-power-tools/admin/cpt-project-types-table.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Client_Power_Tools\\Core\\Common\\add_action() in wp-content/plugins/client-power-tools/common/cpt-status-update-request-button.php:115
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Client_Power_Tools\\Core\\Admin\\__() in wp-content/plugins/client-power-tools/admin/cpt-edit-project-type-form.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Client_Power_Tools\\Core\\Common\\add_action() in wp-content/plugins/client-power-tools/common/cpt-common-messages.php:187
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Client_Power_Tools\\Core\\Admin\\add_action() in wp-content/plugins/client-power-tools/admin/cpt-client-managers.php:141
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Client_Power_Tools\\Core\\Admin\\add_action() in wp-content/plugins/client-power-tools/admin/cpt-edit-project.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Client_Power_Tools\\Core\\Admin\\esc_url() in wp-content/plugins/client-power-tools/admin/cpt-new-client-form.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Client_Power_Tools\\Core\\add_shortcode() in wp-content/plugins/client-power-tools/shortcodes.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: restrict content, project management, portal, client management, frontend login

client-power-tools/client-power-tools.php 92% from 13 tests

This is the main PHP file of "Client Power Tools" version 1.8.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin6,492 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP328399234,796
Sass141555807
CSS3276480
JavaScript54424315
SVG60079
JSON10015

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity34.50
▷ Minimum class complexity6.00
▷ Maximum class complexity124.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods98
▷ Static methods00.00%
▷ Public methods7778.57%
▷ Protected methods2121.43%
▷ Private methods00.00%
Functions137
▷ Named functions13699.27%
▷ Anonymous functions10.73%
Constants3
▷ Global constants3100.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
No PNG files were detected