83% widgets-testimonial-dt

Code Review | Widgets Testimonial DT

WordPress plugin Widgets Testimonial DT scored83%from 54 tests.

About plugin

  • Plugin page: widgets-testimoni...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Jul 4, 2022
  • Latest release: Jul 20, 2022
  • Number of updates: 14
  • Update frequency: every 1.4 days
  • Top authors: dtovar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /532 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.44ms] Passed 4 tests

Analyzing server-side resources used by Widgets Testimonial DT
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.79 ▼0.63
Dashboard /wp-admin3.31 ▼0.0344.32 ▼14.65
Posts /wp-admin/edit.php3.36 ▲0.0148.39 ▼0.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.58 ▼12.60
Media Library /wp-admin/upload.php3.24 ▲0.0136.54 ▼1.87

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Widgets Testimonial DT
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲21714.21 ▼0.348.61 ▲6.8055.88 ▲14.60
Dashboard /wp-admin2,218 ▲305.81 ▲0.68102.06 ▼4.5340.04 ▼3.72
Posts /wp-admin/edit.php2,113 ▲242.02 ▲0.0041.18 ▼4.6038.73 ▲3.83
Add New Post /wp-admin/post-new.php1,434 ▼8517.03 ▼6.37516.90 ▼149.9860.57 ▲2.69
Media Library /wp-admin/upload.php1,409 ▲244.18 ▼0.08102.64 ▼0.9642.40 ▼2.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • 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 no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/widgets-testimonial-dt/index.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

widgets-testimonial-dt/index.php 85% from 13 tests

The principal PHP file in "Widgets Testimonial DT" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("widgets-testimonial-dt.php" instead of "index.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 | 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 detected877 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS54029459
PHP32316334
JavaScript331184

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.00
▷ Minimum class complexity2.00
▷ Maximum class complexity16.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods866.67%
▷ Protected methods216.67%
▷ Private methods216.67%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin