83% display-your-checkatrade

Code Review | Display your Checkatrade

WordPress plugin Display your Checkatrade scored83%from 54 tests.

About plugin

  • Plugin page: display-your-chec...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.5
  • WordPress version: 6.3.1
  • First release: Oct 19, 2017
  • Latest release: Apr 15, 2018
  • Number of updates: 5
  • Update frequency: every 35.6 days
  • Top authors: barryw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /2,650 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Display your Checkatrade
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.00 ▼5.91
Dashboard /wp-admin3.32 ▼0.0348.22 ▼20.20
Posts /wp-admin/edit.php3.37 ▲0.0153.74 ▲3.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.99 ▼20.40
Media Library /wp-admin/upload.php3.24 ▲0.0137.62 ▼3.29

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_ecpt_cat_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Display your Checkatrade
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.34 ▲0.361.68 ▼0.2044.57 ▲3.08
Dashboard /wp-admin2,189 ▲95.62 ▼0.0289.10 ▼8.8437.46 ▼4.90
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0140.05 ▲0.6435.86 ▲1.60
Add New Post /wp-admin/post-new.php1,526 ▼223.13 ▲0.13686.62 ▲12.5049.92 ▼6.23
Media Library /wp-admin/upload.php1,400 ▼34.25 ▲0.04101.50 ▼17.9442.93 ▼5.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_ecpt_cat_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/display-your-checkatrade/display-your-checkatrade-plugin.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === display-your-checkatrade === )
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
You can take inspiration from this readme.txt

display-your-checkatrade/display-your-checkatrade-plugin.php 77% from 13 tests

This is the main PHP file of "Display your Checkatrade" version 0.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("display-your-checkatrade.php" instead of "display-your-checkatrade-plugin.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • 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
Everything looks great! No dangerous files found in this plugin39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1132239

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin