79% clients

Code Review | Clients

WordPress plugin Clients scored79%from 54 tests.

About plugin

  • Plugin page: clients
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-4.9.8
  • WordPress version: 6.3.1
  • First release: Jan 13, 2015
  • Latest release: Oct 12, 2018
  • Number of updates: 16
  • Update frequency: every 85.5 days
  • Top authors: think201 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,515 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼9.54ms] Passed 4 tests

Analyzing server-side resources used by Clients
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1445.43 ▲5.84
Dashboard /wp-admin3.46 ▲0.1149.78 ▼10.53
Posts /wp-admin/edit.php3.57 ▲0.2148.54 ▲1.61
Add New Post /wp-admin/post-new.php6.04 ▲0.1587.68 ▼24.03
Media Library /wp-admin/upload.php3.38 ▲0.1534.05 ▼5.20
All Clients /wp-admin/admin.php?page=ct-all-clients3.3839.04
Client Categories /wp-admin/admin.php?page=ct-categories3.3840.11
Shortcodes /wp-admin/admin.php?page=ct-shortcode3.3837.11
Add New /wp-admin/admin.php?page=ct-add-new3.3836.26
Edit Client /wp-admin/admin.php?page=ct-edit-client3.3832.11

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 28 new files
Database: 1 new table, 6 new options
New tables
wp_ct_clients
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Clients
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.72 ▼0.938.97 ▲7.3241.94 ▲3.04
Dashboard /wp-admin2,240 ▲525.85 ▼0.0597.87 ▼14.4436.72 ▼8.25
Posts /wp-admin/edit.php2,120 ▲312.05 ▲0.0434.68 ▼8.6434.61 ▼1.05
Add New Post /wp-admin/post-new.php1,558 ▲3023.05 ▲4.83670.42 ▲66.5653.62 ▲1.26
Media Library /wp-admin/upload.php1,422 ▲404.18 ▼0.1198.96 ▼1.0043.59 ▼1.84
All Clients /wp-admin/admin.php?page=ct-all-clients1,2193.0441.0227.57
Client Categories /wp-admin/admin.php?page=ct-categories1,0393.1242.8924.96
Shortcodes /wp-admin/admin.php?page=ct-shortcode1,2153.1939.6127.26
Add New /wp-admin/admin.php?page=ct-add-new1,2143.0640.9128.45
Edit Client /wp-admin/admin.php?page=ct-edit-client6881.7010.1313.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/clients/pages/admin-categories.php
    • > /wp-content/plugins/clients/pages/admin-edit-client.php
    • > /wp-content/plugins/clients/templates/ct-slider.php
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ct\\add_action() in wp-content/plugins/clients/includes/post-requests.php:8
    • > PHP Notice
      Undefined variable: ClientList in wp-content/plugins/clients/templates/ct-slider.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_atts() in wp-content/plugins/clients/templates/ct-grid.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/clients/pages/admin-shortcodes.php:4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/clients/includes/ct-listtable.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/clients/clients.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ct\\add_action() in wp-content/plugins/clients/includes/ct.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/clients/pages/admin-add-new.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ct\\CTListTable' not found in wp-content/plugins/clients/pages/admin-all-clients.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/clients/includes/ct-listtable.php on line 6

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: print, featured, list, add, clients

clients/clients.php Passed 13 tests

This is the main PHP file of "Clients" version 1.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
63 characters long description:
Clients provide you an easiest way to add and retrieve clients.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,588 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP17268691,194
Sass2400198
JavaScript6459195
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.43
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods50
▷ Static methods2550.00%
▷ Public methods4488.00%
▷ Protected methods00.00%
▷ Private methods612.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin