90% smntcs-simple-events-widget

Code Review | SMNTCS Simple Events Widget

WordPress plugin SMNTCS Simple Events Widget scored90%from 54 tests.

About plugin

  • Plugin page: smntcs-simple-eve...
  • Plugin version: 2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.4
  • WordPress version: 6.3.1
  • First release: Nov 26, 2017
  • Latest release: Nov 12, 2023
  • Number of updates: 21
  • Update frequency: every 103.7 days
  • Top authors: nielslange (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,267 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.05MB] [CPU: ▼8.25ms] Passed 4 tests

Analyzing server-side resources used by SMNTCS Simple Events Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.75 ▼4.20
Dashboard /wp-admin3.37 ▲0.0245.10 ▼17.19
Posts /wp-admin/edit.php3.42 ▲0.0647.65 ▼0.16
Add New Post /wp-admin/post-new.php5.97 ▲0.0983.80 ▼11.44
Media Library /wp-admin/upload.php3.29 ▲0.0634.32 ▲1.89

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
widget_smntcs_simple_events_widget
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by SMNTCS Simple Events Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5614.35 ▲0.001.72 ▲0.0138.17 ▼5.38
Dashboard /wp-admin2,208 ▲315.86 ▲0.1899.47 ▼5.0638.69 ▼7.92
Posts /wp-admin/edit.php2,116 ▲162.19 ▲0.2341.10 ▲3.9534.98 ▼1.01
Add New Post /wp-admin/post-new.php6,259 ▲4,72425.92 ▲2.95843.74 ▲155.1359.82 ▲0.34
Media Library /wp-admin/upload.php1,416 ▲194.30 ▲0.05105.07 ▲1.8541.09 ▼6.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_smntcs_simple_events_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: simple events, sidebar, widget, event

smntcs-simple-events-widget/smntcs-simple-events-widget.php Passed 13 tests

The principal PHP file in "SMNTCS Simple Events Widget" v. 2.2 is loaded by WordPress automatically on each request
124 characters long description:
Add meta box to posts and pages, to select event start and end date and show upcoming and previous events as sidebar widget.

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
There were no executable files found in this plugin1,985 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
YAML220801,246
CSS14344383
PHP340121194
JSON20067
Markdown133048
XML26442
JavaScript1015

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.50
▷ Minimum class complexity11.00
▷ Maximum class complexity14.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.58MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
js/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
assets/screenshot-02.png211.35KB97.56KB▼ 53.84%
js/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
assets/screenshot-01.png238.39KB115.61KB▼ 51.50%