88% cp-support

Code Review | CP Support

WordPress plugin CP Support scored 88% from 54 tests.

About plugin

  • Plugin page: cp-support
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 5.9.2
  • First release: Nov 9, 2013
  • Latest release: Nov 9, 2013
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: casserlyprogramming (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 812 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.27MB] [CPU: ▼304.61ms] Passed 4 tests

Analyzing server-side resources used by CP Support
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1355.54 ▲1.98
Dashboard /wp-admin3.34 ▼0.0722.82 ▼11.67
Posts /wp-admin/edit.php3.39 ▼0.2423.87 ▼13.42
Add New Post /wp-admin/post-new.php6.13 ▼0.8479.30 ▼1,188.91
Media Library /wp-admin/upload.php3.35 ▲0.0518.56 ▼4.42
Statuses /wp-admin/edit-tags.php?taxonomy=cp_ticket_status&post_type=cp_ticket3.3420.81
Add New /wp-admin/post-new.php?post_type=cp_ticket3.7555.42
Ticket Types /wp-admin/edit-tags.php?taxonomy=cp_ticket_types&post_type=cp_ticket3.3420.74
Product /wp-admin/edit-tags.php?taxonomy=cp_support_product&post_type=cp_ticket3.3421.41
Tickets /wp-admin/edit.php?post_type=cp_ticket3.4325.00

Server storage [IO: ▲0.05MB] [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: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for CP Support
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,841 ▲9915.85 ▲0.176.30 ▲0.062.05 ▼0.07
Dashboard /wp-admin2,941 ▲906.12 ▼0.01126.21 ▼9.63182.65 ▲22.33
Posts /wp-admin/edit.php2,741 ▲843.36 ▼0.0162.84 ▼2.35143.51 ▼0.44
Add New Post /wp-admin/post-new.php1,703 ▲4218.50 ▲2.43407.45 ▼32.24154.21 ▲5.52
Media Library /wp-admin/upload.php1,748 ▲505.55 ▼0.03121.91 ▼10.58200.28 ▲16.09
Statuses /wp-admin/edit-tags.php?taxonomy=cp_ticket_status&post_type=cp_ticket1,7462.8454.67113.08
Add New /wp-admin/post-new.php?post_type=cp_ticket3,80010.29197.16250.03
Ticket Types /wp-admin/edit-tags.php?taxonomy=cp_ticket_types&post_type=cp_ticket1,6702.8154.51103.51
Product /wp-admin/edit-tags.php?taxonomy=cp_support_product&post_type=cp_ticket1,6922.8253.61113.46
Tickets /wp-admin/edit.php?post_type=cp_ticket1,4913.2259.92116.67

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=cp_support_product&post_type=cp_ticket
    • > Notice in wp-content/plugins/cp-support/post_types.php+64
    Undefined index: post_type

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
Almost there! Just fix the following items
  • 5× 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/cp-support/cpcustomfields.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cp-support/post_types.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cp-support/cpshortcodes.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cp-support/taxonomies.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cp-support/cpsupport.php:14

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === cp-support === )
You can look at the official readme.txt

cp-support/cpsupport.php 92% from 13 tests

The entry point to "CP Support" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cp-support.php" instead of "cpsupport.php")

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
Success! There were no dangerous files found in this plugin441 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP531102386
Markdown128055

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ticketicon.png3.51KB0.78KB▼ 77.70%
images/ticketicon16.png3.11KB0.28KB▼ 90.85%
images/ticketicon32.png3.29KB0.47KB▼ 85.73%