83% tradeup-extensions

Code Review | Tradeup Extensions

WordPress plugin Tradeup Extensions scored83%from 54 tests.

About plugin

  • Plugin page: tradeup-extensions
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Jul 13, 2021
  • Latest release: Aug 14, 2021
  • Number of updates: 3
  • Update frequency: every 11.7 days
  • Top authors: wptexture (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,149 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
Install script ran successfully

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

Analyzing server-side resources used by Tradeup Extensions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.86 ▼5.47
Dashboard /wp-admin3.33 ▲0.0248.10 ▼5.73
Posts /wp-admin/edit.php3.38 ▲0.0249.41 ▲2.16
Add New Post /wp-admin/post-new.php5.91 ▲0.0299.52 ▲4.14
Media Library /wp-admin/upload.php3.25 ▲0.0238.31 ▲4.61

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 76 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Tradeup Extensions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.63 ▼1.001.66 ▼0.2737.85 ▼7.04
Dashboard /wp-admin2,203 ▲154.88 ▼1.02108.36 ▼8.3643.51 ▼5.35
Posts /wp-admin/edit.php2,086 ▼02.03 ▼0.1139.66 ▲2.6835.03 ▲0.13
Add New Post /wp-admin/post-new.php1,533 ▲1923.29 ▲5.74653.29 ▼39.1657.46 ▲3.11
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.0097.56 ▼8.2843.42 ▲0.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 58× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Tradeup_Extensions_Base' not found in wp-content/plugins/tradeup-extensions/tradeup/inc/customizer/sections-widgets/items/testimonials.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tradeup-extensions/tradeup/inc/partials/items-hooks.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Tradeup_Extensions_Base' not found in wp-content/plugins/tradeup-extensions/tradeup/inc/customizer/sections-widgets/items/slider.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/tradeup-extensions/tradeup/templates/sections-items/item-actions.php:30
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/tradeup-extensions/tradeup/inc/customizer/sections-mods/testimonials.php:23
    • > PHP Warning
      Use of undefined constant TRADEUP_EXTS_PATH - assumed 'TRADEUP_EXTS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tradeup-extensions/tradeup/inc/customizer/customizer.php on line 15
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/tradeup-extensions/tradeup/inc/customizer/sections-mods/slider.php on line 23
    • > PHP Fatal error
      Uncaught Error: Class 'Tradeup_Extensions_Base' not found in wp-content/plugins/tradeup-extensions/tradeup/inc/customizer/sections-widgets/items/features.php:14
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/tradeup-extensions/tradeup/inc/customizer/sections-mods/team.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tu_ext_show_section() in wp-content/plugins/tradeup-extensions/tradeup/templates/sections/section-about.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("#")
The official readme.txt is a good inspiration

tradeup-extensions/tradeup-extension.php 85% from 13 tests

This is the main PHP file of "Tradeup Extensions" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tradeup-extensions.php" instead of "tradeup-extension.php")

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 plugin8,332 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
PHP611,5732,3145,644
JavaScript104713881,765
CSS46325923

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.83
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods49
▷ Static methods12.04%
▷ Public methods4387.76%
▷ Protected methods36.12%
▷ Private methods36.12%
Functions220
▷ Named functions21999.55%
▷ Anonymous functions10.45%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin