84% canto-testimonials

Code Review | Canto Testimonials

WordPress plugin Canto Testimonials scored84%from 54 tests.

About plugin

  • Plugin page: canto-testimonials
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.7
  • WordPress version: 6.3.1
  • First release: Nov 5, 2013
  • Latest release: Oct 17, 2019
  • Number of updates: 16
  • Update frequency: every 135.8 days
  • Top authors: CantoThemes (93.75%)kitthemes (12.5%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,736 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.81ms] Passed 4 tests

An overview of server-side resources used by Canto Testimonials
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0741.37 ▼1.97
Dashboard /wp-admin3.37 ▲0.0348.85 ▼18.61
Posts /wp-admin/edit.php3.49 ▲0.1351.46 ▼10.03
Add New Post /wp-admin/post-new.php5.98 ▲0.0997.42 ▼8.62
Media Library /wp-admin/upload.php3.30 ▲0.0740.26 ▼0.35
Add New /wp-admin/post-new.php?post_type=testimonials3.3346.72
Testimonials /wp-admin/edit.php?post_type=testimonials3.3437.18

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Canto Testimonials
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.24 ▼0.111.81 ▲0.2136.98 ▼4.18
Dashboard /wp-admin2,222 ▲485.61 ▼0.0394.24 ▼1.6041.66 ▲0.80
Posts /wp-admin/edit.php2,127 ▲271.99 ▼0.0239.66 ▲1.0235.66 ▼2.52
Add New Post /wp-admin/post-new.php1,549 ▲2123.23 ▼0.02597.99 ▼57.0959.16 ▼9.39
Media Library /wp-admin/upload.php1,427 ▲274.20 ▲0.0697.83 ▲0.8745.32 ▼0.01
Add New /wp-admin/post-new.php?post_type=testimonials1,5512.5551.3059.20
Testimonials /wp-admin/edit.php?post_type=testimonials1,0911.9729.8430.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/canto-testimonials/canto-testimonials.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

canto-testimonials/canto-testimonials.php 92% from 13 tests

"Canto Testimonials" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,737 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS441301,055
SVG100399
PHP45345259
JavaScript131524

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.00
▷ Minimum class complexity2.00
▷ Maximum class complexity13.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods872.73%
▷ Protected methods00.00%
▷ Private methods327.27%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to 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
images/controls.png2.74KB1.42KB▼ 48.29%