83% wp-utility-and-performance

Code Review | WP Utility and Performance

WordPress plugin WP Utility and Performance scored83%from 54 tests.

About plugin

  • Plugin page: wp-utility-and-pe...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 13, 2020
  • Latest release: Jul 10, 2021
  • Number of updates: 7
  • Update frequency: every 47.3 days
  • Top authors: mayankmajeji (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /549 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.98ms] Passed 4 tests

Analyzing server-side resources used by WP Utility and Performance
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.57 ▼0.55
Dashboard /wp-admin3.33 ▲0.0246.35 ▼2.16
Posts /wp-admin/edit.php3.38 ▲0.0249.80 ▲0.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.51 ▼21.37
Media Library /wp-admin/upload.php3.25 ▲0.0238.83 ▲3.84
WP Utility & Performance /wp-admin/options-general.php?page=wp-utility-and-performance3.2833.90

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Utility and Performance
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.59 ▲0.411.62 ▼3.2041.43 ▲3.56
Dashboard /wp-admin2,226 ▲355.82 ▲0.90101.90 ▼1.0835.46 ▼7.98
Posts /wp-admin/edit.php2,114 ▲252.04 ▼0.0141.93 ▲0.0436.46 ▼2.16
Add New Post /wp-admin/post-new.php1,561 ▲1718.47 ▲0.24624.67 ▼11.6648.38 ▼1.54
Media Library /wp-admin/upload.php1,417 ▲294.26 ▲0.0899.70 ▼6.1344.24 ▲1.62
WP Utility & Performance /wp-admin/options-general.php?page=wp-utility-and-performance1,2852.0626.1728.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-utility-and-performance/admin/dashboard-notices.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-utility-and-performance/admin/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-utility-and-performance/admin/sidebar.php:9
    • > PHP Warning
      Use of undefined constant WPUP_PLUGIN_URI - assumed 'WPUP_PLUGIN_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-utility-and-performance/admin/settings.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: utility, performance, speed, pagespeed, optimize...

wp-utility-and-performance/class-mantis-wp-utility.php 77% from 13 tests

"WP Utility and Performance" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-utility-and-performance.php" instead of "class-mantis-wp-utility.php")
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

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
Success! There were no dangerous files found in this plugin640 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP468102509
CSS100131

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wordpress-utility-and-performance-plugin-thememantis-logo.png6.56KB4.06KB▼ 38.08%
assets/images/wordpress-utility-and-performance-plugin-thememantis.png3.56KB3.68KB0.00%