84% tbd-events

Code Review | TBD Events

WordPress plugin TBD Events scored84%from 54 tests.

About plugin

  • Plugin page: tbd-events
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Aug 19, 2021
  • Latest release: Aug 19, 2021
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: tbdesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /320 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.00MB] [CPU: ▼3.43ms] Passed 4 tests

Server-side resources used by TBD Events
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.28 ▼1.07
Dashboard /wp-admin3.31 ▲0.0047.23 ▼3.05
Posts /wp-admin/edit.php3.36 ▲0.0048.97 ▼2.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.32 ▼4.43
Media Library /wp-admin/upload.php3.23 ▲0.0034.46 ▼3.54

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by TBD Events
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.20 ▼0.151.78 ▼0.0547.64 ▲5.65
Dashboard /wp-admin2,195 ▲185.63 ▼0.0490.00 ▼0.1438.06 ▼2.59
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.1336.31 ▼0.4133.50 ▼2.66
Add New Post /wp-admin/post-new.php1,526 ▼1123.13 ▲4.84630.44 ▲3.5852.29 ▼12.64
Media Library /wp-admin/upload.php1,397 ▼04.21 ▲0.0797.53 ▼5.4141.95 ▼5.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tbd-events/includes/tbd-events-products.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tbd-events/includes/admin/tbd-events.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/tbd-events/thinkbydesign-events.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tbd-events/includes/admin/tbd-events-options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% 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:
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is stored in the /assets directory.), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

tbd-events/thinkbydesign-events.php 92% from 13 tests

This is the main PHP file of "TBD Events" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tbd-events.php" instead of "thinkbydesign-events.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,482 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8161551,070
CSS33748400
JavaScript30512

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1376.47%
▷ Protected methods423.53%
▷ Private methods00.00%
Functions30
▷ Named functions2893.33%
▷ Anonymous functions26.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/img/busker.png25.42KB13.18KB▼ 48.15%
includes/img/bg.png4.87KB1.91KB▼ 60.82%
includes/img/16x16.png2.25KB0.60KB▼ 73.34%