73% tradecast

Code Review | Tradecast

WordPress plugin Tradecast scored73%from 54 tests.

About plugin

  • Plugin page: tradecast
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 8, 2022
  • Latest release: May 5, 2022
  • Number of updates: 7
  • Update frequency: every 5.1 days
  • Top authors: tradecast (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /558 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.33MB] [CPU: ▼0.85ms] Passed 4 tests

Server-side resources used by Tradecast
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3647.99 ▼0.30
Dashboard /wp-admin3.65 ▲0.3553.56 ▲5.16
Posts /wp-admin/edit.php3.70 ▲0.3458.29 ▲7.84
Add New Post /wp-admin/post-new.php6.38 ▲0.4996.32 ▼11.61
Media Library /wp-admin/upload.php3.51 ▲0.2842.39 ▲3.36
Galleries /wp-admin/admin.php?page=tradecast-galleries3.4839.90
Videos /wp-admin/admin.php?page=tradecast-videos3.4835.19
Settings /wp-admin/admin.php?page=tradecast-settings3.4837.22

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tradecast
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12916.41 ▲1.8545.69 ▲43.9041.16 ▼2.99
Dashboard /wp-admin2,225 ▲456.00 ▲0.31175.42 ▲84.7753.16 ▲11.85
Posts /wp-admin/edit.php2,142 ▲423.03 ▲0.9849.57 ▲5.7636.22 ▼1.23
Add New Post /wp-admin/post-new.php6,402 ▲4,84829.50 ▲11.23959.40 ▲323.3038.41 ▼13.60
Media Library /wp-admin/upload.php1,439 ▲365.50 ▲1.30114.94 ▲2.0645.52 ▲2.18
Galleries /wp-admin/admin.php?page=tradecast-galleries8983.0742.4034.17
Videos /wp-admin/admin.php?page=tradecast-videos8943.0239.4330.69
Settings /wp-admin/admin.php?page=tradecast-settings8372.8940.5628.42

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
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • tradecast_cron
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tradecast-videos
    • > Notice in wp-content/plugins/tradecast/admin/partials/tradecast-admin-videos.php+16
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tradecast/admin/partials/tradecast-admin-galleries.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tradecast/admin/partials/tradecast-admin-videos.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tradecast/admin/partials/tradecast-admin-settings.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=tradecast-galleries
    • > Javascript (severe) in unknown
    /wp-content/plugins/tradecast/admin/assets/tradecast-admin.umd.min.js?ver=1.0.1 30:94000 Uncaught TypeError: Cannot read properties of undefined (reading 'forEach')
    • > GET request to /wp-admin/admin.php?page=tradecast-videos
    • > Javascript (severe) in unknown
    /wp-content/plugins/tradecast/admin/assets/tradecast-admin.umd.min.js?ver=1.0.1 30:102007 Uncaught TypeError: Cannot read properties of undefined (reading 'forEach')
    • > GET request to /wp-admin/admin.php?page=tradecast-settings
    • > Javascript (severe) in unknown
    /wp-content/plugins/tradecast/admin/assets/tradecast-admin.umd.min.js?ver=1.0.1 30:97693 Uncaught TypeError: Cannot read properties of null (reading 'length')

Optimizations

Plugin configuration 97% 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:
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

tradecast/tradecast.php Passed 13 tests

The principal PHP file in "Tradecast" v. 1.0.1 is loaded by WordPress automatically on each request
72 characters long description:
Add Tradecast videos and galleries to your content using this wp-plugin.

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
Good job! No executable or dangerous file extensions detected121,609 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript818,47243,604120,293
PHP252358921,217
JSON20040
SVG14137
HTML26014
CSS3108

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.06
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods73
▷ Static methods22.74%
▷ Public methods5676.71%
▷ Protected methods00.00%
▷ Private methods1723.29%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants42
▷ Global constants37.14%
▷ Class constants3992.86%
▷ Public constants1948.72%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin