68% elvantools

Code Review | EvantoTools

WordPress plugin EvantoTools scored68%from 54 tests.

About plugin

  • Plugin page: elvantools
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-5.2.2
  • WordPress version: 6.3.1
  • First release: Feb 10, 2017
  • Latest release: Aug 21, 2019
  • Number of updates: 40
  • Update frequency: every 23.0 days
  • Top authors: upcast (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,623 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.18MB] [CPU: ▼58.45ms] Passed 4 tests

Analyzing server-side resources used by EvantoTools
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.657.83 ▼37.58
Dashboard /wp-admin2.83 ▼0.519.89 ▼56.93
Posts /wp-admin/edit.php2.83 ▼0.5210.45 ▼39.07
Add New Post /wp-admin/post-new.php2.83 ▼3.058.78 ▼100.22
Media Library /wp-admin/upload.php2.83 ▼0.409.14 ▼23.44
ElvantoTools /wp-admin/options-general.php?page=elvantotools-setting-admin2.8312.00

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_elvanto_tools_roster_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_elvanto_tools_songs_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for EvantoTools
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲16013.58 ▼0.795.82 ▲3.9741.08 ▼3.09
Dashboard /wp-admin2,230 ▲244.87 ▼0.02105.48 ▼0.4140.98 ▲2.01
Posts /wp-admin/edit.php2,106 ▲62.04 ▲0.0335.98 ▼5.0434.92 ▼2.36
Add New Post /wp-admin/post-new.php1,531 ▲523.26 ▲5.75687.39 ▲45.5255.22 ▲6.59
Media Library /wp-admin/upload.php1,406 ▲94.19 ▼0.0893.67 ▼8.0443.43 ▼1.04
ElvantoTools /wp-admin/options-general.php?page=elvantotools-setting-admin3,0151.7328.1637.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > 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 elvantotoolsStylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_elvanto_tools_roster_widget
    • widget_theysaidso_widget
    • widget_elvanto_tools_songs_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=elvantotools-setting-admin
    • > 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 elvantotoolsStylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=elvantotools-setting-admin
    • > Notice in wp-content/plugins/elvantools/settings.php+582
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/elvantools/widget.php:802
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/elvantools/widget.php:802
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/elvantools/1.5/widget.php:722
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/elvantools/widget.php:802
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/elvantools/1.5/widget.php:722

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: church, songs, widget, roster, elvanto...

elvantools/elvantotools.php 92% from 13 tests

"EvantoTools" version 2.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("elvantools.php" instead of "elvantotools.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,874 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP64384033,531
CSS2342283
JavaScript21260

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity62.50
▷ Minimum class complexity42.00
▷ Maximum class complexity76.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods107
▷ Static methods00.00%
▷ Public methods107100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
1.5/ElvantoToolsPPHeader.png26.16KB4.04KB▼ 84.56%
ElvantoToolsPPHeader.png26.16KB4.04KB▼ 84.56%