83% mydirtyhobby-affiliate-sign-up

Code Review | MyDirtyHobby Affiliates

WordPress plugin MyDirtyHobby Affiliates scored83%from 54 tests.

About plugin

  • Plugin page: mydirtyhobby-affi...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 30, 2018
  • Latest release: Mar 4, 2019
  • Number of updates: 9
  • Update frequency: every 24.5 days
  • Top authors: mindgeekcy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,781 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.10MB] [CPU: ▼2.00ms] Passed 4 tests

This is a short check of server-side resources used by MyDirtyHobby Affiliates
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.98 ▼1.63
Dashboard /wp-admin3.40 ▲0.0943.85 ▼4.36
Posts /wp-admin/edit.php3.51 ▲0.1548.51 ▼2.85
Add New Post /wp-admin/post-new.php6.00 ▲0.1197.02 ▲5.43
Media Library /wp-admin/upload.php3.32 ▲0.0935.44 ▲0.84

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for MyDirtyHobby Affiliates
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,097 ▲36213.64 ▼0.766.82 ▲4.4541.25 ▼5.92
Dashboard /wp-admin2,223 ▲355.79 ▼0.0995.29 ▼16.7538.82 ▼4.81
Posts /wp-admin/edit.php2,106 ▲172.00 ▼0.0539.23 ▼4.3434.17 ▼1.90
Add New Post /wp-admin/post-new.php1,545 ▲1223.20 ▲0.06592.85 ▼73.2458.54 ▲3.23
Media Library /wp-admin/upload.php1,408 ▲204.19 ▼0.0095.75 ▲0.1339.06 ▼2.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/mydirtyhobby-affiliate-sign-up/admin/partials/mdh-promote-admin-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/mydirtyhobby-affiliate-sign-up/public/partials/mdh-promote-popup-de.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/mydirtyhobby-affiliate-sign-up/public/partials/mdh-promote-popup-en.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: adult, affiliate

mydirtyhobby-affiliate-sign-up/mdh-promote.php 69% from 13 tests

Analyzing the main PHP file in "MyDirtyHobby Affiliates" version 1.0.0
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/registrationplugin" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mydirtyhobby-affiliate-sign-up.php" instead of "mdh-promote.php")
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: Keep the plugin description shorter than 140 characters (currently 161 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin901 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13182523516
Sass290192
CSS232134
JavaScript2135459

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.57
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods3587.50%
▷ Protected methods00.00%
▷ Private methods512.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/logo_mdh.png10.38KB6.03KB▼ 41.97%