78% testimonial-king-light

Code Review | Testimonials King Light

WordPress plugin Testimonials King Light scored78%from 54 tests.

About plugin

  • Plugin page: testimonial-king-...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.8
  • WordPress version: 6.3.1
  • First release: Jul 4, 2017
  • Latest release: Jul 4, 2017
  • Number of updates: 18
  • Update frequency: every 5.1 days
  • Top authors: gauravchaware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /850 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼2.16ms] Passed 4 tests

A check of server-side resources used by Testimonials King Light
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2144.02 ▼1.43
Dashboard /wp-admin3.49 ▲0.1955.59 ▼3.95
Posts /wp-admin/edit.php3.61 ▲0.2550.49 ▼0.84
Add New Post /wp-admin/post-new.php6.08 ▲0.1888.18 ▼2.42
Media Library /wp-admin/upload.php3.42 ▲0.1848.38 ▲9.00
All Testimonial /wp-admin/edit.php?post_type=gmctk_testimonial3.4639.14
Add New /wp-admin/post-new.php?post_type=gmctk_testimonial3.5656.72
Groups /wp-admin/edit-tags.php?taxonomy=gmctk_testimonial_group&post_type=gmctk_testimonial3.4138.08
Options /wp-admin/edit.php?post_type=gmctk_testimonial&page=gmctk_options3.4536.31

Server storage [IO: ▲0.15MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
gmctk_general_options

Browser metrics Passed 4 tests

Testimonials King Light: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.27 ▼1.111.86 ▲0.0450.72 ▲8.14
Dashboard /wp-admin2,228 ▲435.87 ▼0.03112.64 ▲3.6369.61 ▲24.35
Posts /wp-admin/edit.php2,126 ▲372.02 ▲0.0535.89 ▼0.8533.42 ▼7.53
Add New Post /wp-admin/post-new.php1,543 ▲1023.08 ▼0.20784.19 ▲111.5554.57 ▼6.07
Media Library /wp-admin/upload.php1,425 ▲374.24 ▲0.05103.10 ▼9.2376.79 ▲28.08
All Testimonial /wp-admin/edit.php?post_type=gmctk_testimonial1,1452.2734.7231.78
Add New /wp-admin/post-new.php?post_type=gmctk_testimonial2,4527.65168.22123.86
Groups /wp-admin/edit-tags.php?taxonomy=gmctk_testimonial_group&post_type=gmctk_testimonial1,2982.1431.8429.84
Options /wp-admin/edit.php?post_type=gmctk_testimonial&page=gmctk_options2,2813.1580.1628.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/testimonial-king-light/includes/template/one/footer.php
    • > /wp-content/plugins/testimonial-king-light/includes/template/one/header.php
  • 45× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: gmctk_options in wp-content/plugins/testimonial-king-light/includes/template/one/header.php on line 26
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/testimonial-king-light/includes/template/one/content.php on line 4
    • > PHP Notice
      Undefined variable: gmctk_options in wp-content/plugins/testimonial-king-light/includes/template/one/header.php on line 3
    • > PHP Notice
      Undefined variable: gmctk_options in wp-content/plugins/testimonial-king-light/includes/template/one/header.php on line 18
    • > PHP Notice
      Undefined variable: gmctk_options in wp-content/plugins/testimonial-king-light/includes/template/one/header.php on line 32
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/testimonial-king-light/includes/template/one/header.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/testimonial-king-light/includes/template/one/content.php on line 22
    • > PHP Notice
      Undefined variable: gmctk_options in wp-content/plugins/testimonial-king-light/includes/template/one/header.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/testimonial-king-light/includes/template/one/header.php on line 32
    • > PHP Notice
      Undefined variable: gmctk_options in wp-content/plugins/testimonial-king-light/includes/template/one/header.php on line 4

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: testimonials, testimonials slider, random testimonials

testimonial-king-light/testimoinal-king.php 92% from 13 tests

"Testimonials King Light" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("testimonial-king-light.php" instead of "testimoinal-king.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,734 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP17216991,137
CSS3706525
JavaScript4142772

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/rating-icon.png3.67KB2.13KB▼ 41.83%
admin/images/gmctk.PNG1.55KB1.39KB▼ 9.85%