78% edd-mark-as-add-on

Code Review | EDD Mark As Addon

WordPress plugin EDD Mark As Addon scored78%from 54 tests.

About plugin

  • Plugin page: edd-mark-as-add-on
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.5
  • WordPress version: 6.3.1
  • First release: May 5, 2018
  • Latest release: May 5, 2018
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: alessandro.tesoro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.74ms] Passed 4 tests

Analyzing server-side resources used by EDD Mark As Addon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.24 ▼1.54
Dashboard /wp-admin3.32 ▲0.0245.61 ▼1.88
Posts /wp-admin/edit.php3.37 ▲0.0246.91 ▼3.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.66 ▼16.48
Media Library /wp-admin/upload.php3.24 ▲0.0235.29 ▲0.88

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

Browser metrics Passed 4 tests

An overview of browser requirements for EDD Mark As Addon
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.33 ▼1.042.03 ▲0.1543.61 ▼6.73
Dashboard /wp-admin2,206 ▲184.85 ▼0.98110.92 ▲9.5140.29 ▼4.27
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0239.26 ▼1.9634.97 ▼1.65
Add New Post /wp-admin/post-new.php1,542 ▲2818.27 ▲0.83627.02 ▼29.0254.03 ▼2.87
Media Library /wp-admin/upload.php1,391 ▲34.31 ▲0.1399.77 ▲1.8941.81 ▼2.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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
Good news, no errors were detected

SRP 0% 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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/edd-mark-as-add-on/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 107× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Key_Value_Datastore' not found in wp-content/plugins/edd-mark-as-add-on/vendor/htmlburger/carbon-fields/core/Datastore/Theme_Options_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/edd-mark-as-add-on/vendor/htmlburger/carbon-fields/core/Container/Widget_Container.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/edd-mark-as-add-on/vendor/htmlburger/carbon-fields/core/Container/Term_Meta_Container.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/edd-mark-as-add-on/vendor/htmlburger/carbon-fields/core/Container/Condition/Term_Condition.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/edd-mark-as-add-on/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/edd-mark-as-add-on/vendor/htmlburger/carbon-fields/core/Container/Condition/User_Role_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/edd-mark-as-add-on/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Any_Equality_Comparer.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/edd-mark-as-add-on/vendor/htmlburger/carbon-fields/core/Field/Radio_Field.php:8
    • > PHP Notice
      Undefined variable: errors in wp-content/plugins/edd-mark-as-add-on/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 35
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/edd-mark-as-add-on/vendor/htmlburger/carbon-fields/core/Field/Separator_Field.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: rest, edd, easy digital downloads, rest api, freemium addons

edd-mark-as-add-on/edd-mark-as-addon.php 85% from 13 tests

"EDD Mark As Addon" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("edd-mark-as-add-on.php" instead of "edd-mark-as-addon.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin76,912 lines of code in 335 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14215,77427,19864,907
PHP1402,2436,0137,971
PO File151,3601,9723,049
CSS28290127585
JSON700332
Markdown324068

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.67
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces22
Interfaces5
Traits0
Classes119
▷ Abstract classes119.24%
▷ Concrete classes10890.76%
▷ Final classes21.85%
Methods821
▷ Static methods9010.96%
▷ Public methods66480.88%
▷ Protected methods15118.39%
▷ Private methods60.73%
Functions95
▷ Named functions2223.16%
▷ Anonymous functions7376.84%
Constants32
▷ Global constants1031.25%
▷ Class constants2268.75%
▷ Public constants22100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin