72% wprong-testimonial-slider

Code Review | Wprong Testimonial Slider

WordPress plugin Wprong Testimonial Slider scored72%from 54 tests.

About plugin

  • Plugin page: wprong-testimonia...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Nov 27, 2015
  • Latest release: Dec 12, 2017
  • Number of updates: 14
  • Update frequency: every 53.3 days
  • Top authors: porosh (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,630 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.51MB] [CPU: ▲5.59ms] Passed 4 tests

Analyzing server-side resources used by Wprong Testimonial Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3147.08 ▲5.65
Dashboard /wp-admin3.92 ▲0.6158.15 ▲5.79
Posts /wp-admin/edit.php3.93 ▲0.5756.60 ▲11.73
Add New Post /wp-admin/post-new.php6.48 ▲0.5994.10 ▲6.57
Media Library /wp-admin/upload.php3.80 ▲0.5838.25 ▲4.34
All Testimonial /wp-admin/edit.php?post_type=testimonial_post3.8744.25
Testimonial Settings /wp-admin/edit.php?post_type=testimonial_post&page=theme-option3.8036.00
Add New testimonial /wp-admin/post-new.php?post_type=testimonial_post4.2850.13

Server storage [IO: ▲0.34MB] [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: 48 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
wprong_general_settings
wprong_style_settings
widget_recent-comments

Browser metrics Passed 4 tests

Wprong Testimonial Slider: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,121 ▲37515.32 ▲0.956.62 ▲4.7542.91 ▼1.92
Dashboard /wp-admin2,406 ▲2156.71 ▲1.85126.84 ▲13.6137.61 ▼8.96
Posts /wp-admin/edit.php2,312 ▲2203.55 ▲1.5551.05 ▲14.9133.05 ▼3.34
Add New Post /wp-admin/post-new.php1,564 ▲4523.26 ▼0.02587.14 ▼88.3434.24 ▼24.52
Media Library /wp-admin/upload.php1,451 ▲604.38 ▲0.2183.45 ▼20.2240.70 ▼3.93
All Testimonial /wp-admin/edit.php?post_type=testimonial_post1,2883.6648.1127.49
Testimonial Settings /wp-admin/edit.php?post_type=testimonial_post&page=theme-option1,9734.8899.8426.58
Add New testimonial /wp-admin/post-new.php?post_type=testimonial_post2,3467.87175.8268.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • wprong_style_settings
    • can_compress_scripts
    • wprong_general_settings
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wprong-testimonial-slider/public/partials/wprong-testimonial-plugin-public-display.php
    • > /wp-content/plugins/wprong-testimonial-slider/admin/partials/wprong-testimonial-plugin-admin-display.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wprong-testimonial-slider/public/cmb2/functions.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wprong-testimonial-slider/public/inc/shortcode-tinymce-button.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wprong-testimonial-slider/public/settings/class.wprong_testimonials.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wprong-testimonial-slider/public/inc/custom_post.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wprong-testimonial-slider/public/cmb2/bootstrap.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wprong-testimonial-slider/public/cmb2/init.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wprong-testimonial-slider/public/class-wprong-testimonial-plugin-public.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wprong-testimonial-slider/public/inc/short_code.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wprong-testimonial-slider/public/settings/class.wprong_testimonials.php:30
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wprong-testimonial-slider/public/class-wprong-testimonial-plugin-public.php on line 15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=testimonial_post&page=theme-option
    • > Rendering (warning) in unknown
    /wp-admin/edit.php?post_type=testimonial_post&page=theme-option 161 The specified value "14px" cannot be parsed, or is out of range.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === wprong-testimonial-slider === )
The official readme.txt is a good inspiration

wprong-testimonial-slider/wprong-testimonial-plugin.php 85% from 13 tests

The main file in "Wprong Testimonial Slider" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wprong-testimonial-slider.php" instead of "wprong-testimonial-plugin.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin3,776 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP331,2332,7743,526
CSS45633226
JavaScript5126524

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity27.86
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods252
▷ Static methods228.73%
▷ Public methods23693.65%
▷ Protected methods83.17%
▷ Private methods83.17%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/js/mce_button.png1.34KB1.24KB▼ 7.30%
public/images/controls.png2.74KB1.42KB▼ 48.29%