68% simple-autopop

Code Review | Simple AutoPOP

WordPress plugin Simple AutoPOP scored68%from 54 tests.

About plugin

  • Plugin page: simple-autopop
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 21, 2018
  • Latest release: Mar 21, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: maksim270 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /523 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.88MB] [CPU: ▼52.14ms] Passed 4 tests

Analyzing server-side resources used by Simple AutoPOP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.356.01 ▼40.43
Dashboard /wp-admin2.13 ▼1.177.36 ▼41.75
Posts /wp-admin/edit.php2.13 ▼1.236.65 ▼42.08
Add New Post /wp-admin/post-new.php2.13 ▼3.767.91 ▼84.31
Media Library /wp-admin/upload.php2.13 ▼1.108.00 ▼24.98
Simple AutoPOP /wp-admin/options-general.php?page=simple_autopop2.137.16

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 14 new options
New WordPress options
db_upgraded
widget_recent-posts
simple_autopop_title
simple_autopop_activate_links
simple_autopop_event_number
widget_simple_autopop_widget
can_compress_scripts
simple_autopop_saved_search_id
simple_autopop_cache
simple_autopop_url
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple AutoPOP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲8713.26 ▼1.104.78 ▲2.5738.75 ▼25.81
Dashboard /wp-admin2,221 ▲334.80 ▼0.12108.78 ▲4.1642.47 ▲3.30
Posts /wp-admin/edit.php2,110 ▲212.02 ▼0.0141.35 ▲3.3037.46 ▲2.33
Add New Post /wp-admin/post-new.php1,539 ▲2518.02 ▲0.41611.24 ▼82.0249.25 ▼7.64
Media Library /wp-admin/upload.php1,409 ▲184.20 ▼0.0097.09 ▼5.4542.30 ▼1.45
Simple AutoPOP /wp-admin/options-general.php?page=simple_autopop8552.0523.9030.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the simple-autopop-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_simple_autopop_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=simple_autopop
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the simple-autopop-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=simple_autopop
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the simple-autopop-styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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 fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-autopop/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/simple-autopop/templates/settings.tpl.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-autopop/widget.php:2

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 errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

simple-autopop/simple-autopop.php Passed 13 tests

This is the main PHP file of "Simple AutoPOP" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
116 characters long description:
Displays events from EventUpon.com, activate and place [simple-autopop] tag to a page you want to have the calendar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected566 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP790185461
CSS12615105

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.83
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods34
▷ Static methods514.71%
▷ Public methods3191.18%
▷ Protected methods00.00%
▷ Private methods38.82%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin