10% whatsonincapetown-event-search-widget

Code Review | WhatsOnInCapeTown Event Search Widget

WordPress plugin WhatsOnInCapeTown Event Search Widget scored10%from 54 tests.

About plugin

  • Plugin page: whatsonincapetown...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 2, 2014
  • Latest release: Feb 3, 2014
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: mc-lennan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /569 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/whatsonincapetown-event-search-widget/mc_woict.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; WOICT_Event_Search has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼58.59ms] Passed 4 tests

This is a short check of server-side resources used by WhatsOnInCapeTown Event Search Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.42 ▼43.54
Dashboard /wp-admin2.09 ▼1.265.66 ▼58.31
Posts /wp-admin/edit.php2.09 ▼1.275.74 ▼40.10
Add New Post /wp-admin/post-new.php2.09 ▼3.806.91 ▼92.39
Media Library /wp-admin/upload.php2.09 ▼1.146.41 ▼32.56

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WhatsOnInCapeTown Event Search Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲18213.57 ▼0.786.48 ▲4.8546.46 ▲1.77
Dashboard /wp-admin2,216 ▲425.64 ▼0.0297.25 ▼3.3442.42 ▼2.02
Posts /wp-admin/edit.php2,124 ▲242.06 ▲0.0737.94 ▼1.7434.84 ▲1.56
Add New Post /wp-admin/post-new.php1,545 ▲1723.13 ▼0.09678.76 ▼33.1936.44 ▼25.19
Media Library /wp-admin/upload.php1,424 ▲244.29 ▲0.08112.85 ▲14.6950.02 ▲7.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/whatsonincapetown-event-search-widget/mc_woict.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; WOICT_Event_Search has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_searchpost-widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/whatsonincapetown-event-search-widget/mc_woict/mc_woict.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/whatsonincapetown-event-search-widget/mc_woict.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Add an image for screenshot #1 (2.)
The official readme.txt is a good inspiration

whatsonincapetown-event-search-widget/mc_woict.php 92% from 13 tests

This is the main PHP file of "WhatsOnInCapeTown Event Search Widget" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("whatsonincapetown-event-search-widget.php" instead of "mc_woict.php")

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
No dangerous file extensions were detected2,906 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24093672,317
CSS11662433
PHP210253149
XML1007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin