78% tradays-economic-calendar

Code Review | Tradays Economic Calendar

WordPress plugin Tradays Economic Calendar scored78%from 54 tests.

About plugin

  • Plugin page: tradays-economic-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Apr 9, 2019
  • Latest release: Jul 26, 2021
  • Number of updates: 10
  • Update frequency: every 84.3 days
  • Top authors: mql5 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /14,226 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.47ms] Passed 4 tests

An overview of server-side resources used by Tradays Economic Calendar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.43 ▼2.46
Dashboard /wp-admin3.33 ▲0.0345.47 ▼1.66
Posts /wp-admin/edit.php3.45 ▲0.0948.72 ▼3.06
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.25 ▼10.13
Media Library /wp-admin/upload.php3.26 ▲0.0332.21 ▼2.21

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_tradays_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tradays Economic Calendar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8413.30 ▲0.291.94 ▼3.0841.05 ▼4.36
Dashboard /wp-admin2,206 ▲184.89 ▼1.01102.91 ▼3.5136.96 ▼5.47
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0142.91 ▲6.9238.78 ▲6.40
Add New Post /wp-admin/post-new.php6,357 ▲4,83827.72 ▲4.46832.17 ▲151.4867.40 ▲7.38
Media Library /wp-admin/upload.php1,385 ▼34.23 ▼0.0196.63 ▼0.6641.16 ▼3.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_tradays_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tradays-economic-calendar/inc/class.shortcode.php
    • > /wp-content/plugins/tradays-economic-calendar/inc/class.tradays.php
    • > /wp-content/plugins/tradays-economic-calendar/tradays-economic-calendar.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tradays-economic-calendar/inc/class.widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tradays-economic-calendar/views/widget-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: economic, events, tradays, widget, calendar

tradays-economic-calendar/tradays-economic-calendar.php 92% from 13 tests

"Tradays Economic Calendar" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin8,063 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JSON5007,288
PHP75825387
JavaScript53230314
PO File1181958
Sass20012
SVG2004
CSS10110

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity2.00
▷ Maximum class complexity16.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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