83% rtd-client-testimonial

Code Review | Rtd Client Testimonial

WordPress plugin Rtd Client Testimonial scored83%from 54 tests.

About plugin

  • Plugin page: rtd-client-testim...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2015
  • Latest release: Nov 5, 2015
  • Number of updates: 15
  • Update frequency: every 0.1 days
  • Top authors: rootdesign (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /816 total downloads

Benchmarks

Plugin footprint 83% from 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.32MB] [CPU: ▼6.17ms] Passed 4 tests

Analyzing server-side resources used by Rtd Client Testimonial
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2838.02 ▼3.83
Dashboard /wp-admin3.69 ▲0.3554.58 ▼4.05
Posts /wp-admin/edit.php3.71 ▲0.3647.95 ▼2.12
Add New Post /wp-admin/post-new.php6.22 ▲0.3485.53 ▼14.67
Media Library /wp-admin/upload.php3.55 ▲0.3237.15 ▲4.17
All Testimonial /wp-admin/edit.php?post_type=testimonial3.5937.12
Add New /wp-admin/post-new.php?post_type=testimonial4.0849.86

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 332 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rtd Client Testimonial
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲18414.01 ▼0.395.50 ▲3.6438.61 ▼4.54
Dashboard /wp-admin2,241 ▲564.92 ▼0.87102.53 ▼5.4342.12 ▼2.41
Posts /wp-admin/edit.php2,127 ▲382.10 ▲0.0436.01 ▼5.1033.01 ▼4.93
Add New Post /wp-admin/post-new.php1,553 ▲2518.16 ▼0.05654.08 ▲41.4452.67 ▼5.69
Media Library /wp-admin/upload.php1,429 ▲414.29 ▲0.0999.96 ▲2.0142.83 ▼2.84
All Testimonial /wp-admin/edit.php?post_type=testimonial1,0911.9932.8730.28
Add New /wp-admin/post-new.php?post_type=testimonial2,5207.87194.7664.25

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% 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 everything seems fine, this is not an exhaustive test

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 fix the following items
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: test_root in wp-content/plugins/rtd-client-testimonial/assets/libs/cmb2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/rtd-client-testimonial/assets/libs/cmb2/bootstrap.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/rtd-client-testimonial/assets/libs/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rtd-client-testimonial/assets/inc/metabox.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rtd-client-testimonial/assets/libs/cmb2/init.php:119
    • > PHP Warning
      require_once(/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/rtd-client-testimonial/assets/libs/cmb2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/rtd-client-testimonial/assets/libs/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/rtd-client-testimonial/assets/libs/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/rtd-client-testimonial/assets/libs/cmb2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/rtd-client-testimonial/assets/libs/cmb2/tests/cmb-tests-base.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots require images: #1 (This is the view of the admin panel page), #2 (This is the view of the plugin when you add this in the any page or footer of the post), #3 (This is the view of the plugin when you add this in the widgets in your sites)
The official readme.txt is a good inspiration

rtd-client-testimonial/rtd-testimonial.php 77% from 13 tests

The main PHP file in "Rtd Client Testimonial" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 315 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rtd-client-testimonial.php" instead of "rtd-testimonial.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
No dangerous file extensions were detected40,377 lines of code in 169 files:
LanguageFilesBlank linesComment linesLines of code
PO File11912,61416,20928,917
PHP231,3932,2724,603
CSS71,0531,0564,086
Sass11168231,116
SVG200909
JavaScript5171124633
Bourne Shell119771
Markdown114042

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity26.95
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes00.00%
Methods313
▷ Static methods237.35%
▷ Public methods29995.53%
▷ Protected methods92.88%
▷ Private methods51.60%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.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
20 PNG files occupy 0.20MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/libs/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
assets/images/controls.png2.74KB1.42KB▼ 48.29%
assets/libs/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
assets/libs/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
assets/images/next.png1.21KB0.56KB▼ 53.52%