83% eventon-promote

Code Review | EventON Promote

WordPress plugin EventON Promote scored83%from 54 tests.

About plugin

  • Plugin page: eventon-promote
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8.3
  • WordPress version: 6.3.1
  • First release: Dec 30, 2021
  • Latest release: Jan 7, 2022
  • Number of updates: 8
  • Update frequency: every 1.0 days
  • Top authors: momothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /320 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼11.19ms] Passed 4 tests

A check of server-side resources used by EventON Promote
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.36 ▲1.80
Dashboard /wp-admin3.35 ▲0.0050.44 ▼18.86
Posts /wp-admin/edit.php3.40 ▲0.0450.26 ▼2.95
Add New Post /wp-admin/post-new.php5.94 ▲0.0685.72 ▼19.07
Media Library /wp-admin/upload.php3.27 ▲0.0433.56 ▼3.88

Server storage [IO: ▲0.30MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/eventon-promote/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for EventON Promote
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.42 ▲0.211.74 ▼0.1543.20 ▼0.63
Dashboard /wp-admin2,224 ▲245.82 ▼0.09102.95 ▼30.2240.57 ▼1.32
Posts /wp-admin/edit.php2,104 ▲72.00 ▼0.0436.11 ▼1.0433.33 ▲0.32
Add New Post /wp-admin/post-new.php6,203 ▲4,67719.38 ▲1.88840.06 ▲153.4561.77 ▲10.37
Media Library /wp-admin/upload.php1,409 ▲94.26 ▲0.08100.33 ▼19.8244.96 ▼0.90

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eventon-promote/includes/admin/class-mmt-promote-admin-init.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/eventon-promote/includes/admin/admin-info.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eventon-promote/includes/admin/class-mmt-promote-admin-ajax.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eventon-promote/class-mmt-promote.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/eventon-promote/includes/admin/admin-slide-ins.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/eventon-promote/includes/admin/admin-popup.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eventon-promote/includes/class-mmt-promote-frontend-ajax.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/eventon-promote/includes/admin/class-admin-settings.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eventon-promote/includes/class-mmt-promote-script-style.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/eventon-promote/includes/class-mmt-promote-widget.php:8

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 90% from 29 tests

readme.txt 94% from 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
These attributes need your attention: The official readme.txt might help

eventon-promote/class-mmt-promote.php 85% from 13 tests

The main PHP file in "EventON Promote" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("eventon-promote.php" instead of "class-mmt-promote.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
No dangerous file extensions were detected5,219 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP161615081,839
JavaScript111732961,722
CSS6372611,579
Sass57379

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity23.40
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods81
▷ Static methods00.00%
▷ Public methods81100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
No PNG images were found in this plugin