10% cp-testimonial

Code Review | CP Testimonial

WordPress plugin CP Testimonial scored10%from 54 tests.

About plugin

  • Plugin page: cp-testimonial
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 15, 2016
  • Latest release: Apr 15, 2016
  • Number of updates: 15
  • Update frequency: every 0.2 days
  • Top authors: creativepig (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,641 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/cp-testimonial/testimonial.php+46
    Use of undefined constant active - assumed 'active' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.73MB] [CPU: ▼30.14ms] Passed 4 tests

Analyzing server-side resources used by CP Testimonial
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2339.99 ▲2.88
Dashboard /wp-admin3.21 ▼0.0922.20 ▼23.53
Posts /wp-admin/edit.php3.21 ▼0.1425.84 ▼19.87
Add New Post /wp-admin/post-new.php3.21 ▼2.6724.16 ▼66.85
Media Library /wp-admin/upload.php3.21 ▼0.0123.45 ▼10.30
Settings /wp-admin/edit.php?post_type=creativetestimonial&page=creative_testimonial3.2222.82
Add Testimonial /wp-admin/post-new.php?post_type=creativetestimonial3.2124.82
All Testimonials /wp-admin/edit.php?post_type=creativetestimonial3.2221.42

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
testimonials_settings

Browser metrics Passed 4 tests

Checking browser requirements for CP Testimonial
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,116 ▲37015.84 ▲1.086.02 ▲4.2585.66 ▲44.31
Dashboard /wp-admin2,401 ▲2466.79 ▲1.13133.82 ▲33.3642.74 ▲3.11
Posts /wp-admin/edit.php2,316 ▲2273.63 ▲1.5856.56 ▲20.7732.86 ▼3.67
Add New Post /wp-admin/post-new.php1,568 ▲5423.46 ▲5.79637.68 ▼31.2138.00 ▼12.52
Media Library /wp-admin/upload.php1,446 ▲674.45 ▲0.2682.78 ▼18.4942.37 ▼5.56
Settings /wp-admin/edit.php?post_type=creativetestimonial&page=creative_testimonial5,3294.5176.1529.96
Add Testimonial /wp-admin/post-new.php?post_type=creativetestimonial1,6493.9364.3531.27
All Testimonials /wp-admin/edit.php?post_type=creativetestimonial1,3053.6255.1929.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • testimonials_settings

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
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=creativetestimonial
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/edit.php?post_type=creativetestimonial&page=creative_testimonial
    • > Notice in wp-content/plugins/cp-testimonial/testimonial.php+923
    Undefined index: starcolor
    • > GET request to /wp-admin/edit.php?post_type=creativetestimonial&page=creative_testimonial
    • > Notice in wp-content/plugins/cp-testimonial/testimonial.php+931
    Undefined index: iconcolor
    • > GET request to /wp-admin/edit.php?post_type=creativetestimonial&page=creative_testimonial
    • > Notice in wp-content/plugins/cp-testimonial/testimonial.php+940
    Undefined index: pagicolor
    • > GET request to /wp-admin/edit.php?post_type=creativetestimonial&page=creative_testimonial
    • > Notice in wp-content/plugins/cp-testimonial/testimonial.php+948
    Undefined index: pagiactivecolor

SRP 50% 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cp-testimonial/testimonial.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=creativetestimonial&page=creative_testimonial
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=creativetestimonial&page=creative_testimonial 1015:3 Uncaught SyntaxError: Unexpected token '
    • > GET request to /wp-admin/post-new.php?post_type=creativetestimonial
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=creativetestimonial 434:3 Uncaught SyntaxError: Unexpected token '
    • > GET request to /wp-admin/edit.php?post_type=creativetestimonial
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=creativetestimonial 300:3 Uncaught SyntaxError: Unexpected token '

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: autoplay, custom features, free testimonial plugin, ratings, responsive testimonial slider...

cp-testimonial/testimonial.php 92% from 13 tests

The main PHP script in "CP Testimonial" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cp-testimonial.php" instead of "testimonial.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin10,112 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS66531566,229
PHP1146201,371
JavaScript4238411,357
SVG3001,155

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity70.00
▷ Minimum class complexity70.00
▷ Maximum class complexity70.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1794.44%
▷ Protected methods00.00%
▷ Private methods15.56%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin