89% plugin-load-filter

Code Review | Plugin Load Filter

WordPress plugin Plugin Load Filter scored89%from 54 tests.

About plugin

  • Plugin page: plugin-load-filter
  • Plugin version: 4.0.17
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Apr 17, 2015
  • Latest release: Oct 20, 2023
  • Number of updates: 48
  • Update frequency: every 64.8 days
  • Top authors: enomoto celtislab (100%)

Code review

54 tests

User reviews

49 reviews

Install metrics

10,000+ active /132,447 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.23MB] [CPU: ▼1.69ms] Passed 4 tests

A check of server-side resources used by Plugin Load Filter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2142.53 ▲1.86
Dashboard /wp-admin3.54 ▲0.1948.49 ▼9.94
Posts /wp-admin/edit.php3.65 ▲0.2946.96 ▼1.07
Add New Post /wp-admin/post-new.php6.22 ▲0.33579.04 ▲487.00
Media Library /wp-admin/upload.php3.46 ▲0.2339.13 ▲2.38

Server storage [IO: ▲0.26MB] [DB: ▲0.05MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Plugin Load Filter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5514.28 ▼0.321.69 ▼0.0538.57 ▼4.70
Dashboard /wp-admin2,204 ▲275.52 ▼0.1581.93 ▼5.7037.75 ▼9.12
Posts /wp-admin/edit.php2,115 ▲151.96 ▼0.0234.94 ▼2.8933.74 ▲2.18
Add New Post /wp-admin/post-new.php6,302 ▲4,77420.84 ▼2.18886.06 ▲228.6068.56 ▲9.17
Media Library /wp-admin/upload.php1,412 ▲154.15 ▼0.06108.10 ▲4.1544.17 ▼0.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.05MB] 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Filter Registration setting.), #2 (Page Filter Activation setting.), #3 (Setting of each post)
You can take inspiration from this readme.txt

plugin-load-filter/plugin-load-filter.php 92% from 13 tests

Analyzing the main PHP file in "Plugin Load Filter" version 4.0.17
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,291 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21642962,128
PO File15558163

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 180)
Cyclomatic complexity
Average complexity per logical line of code0.73
Average class complexity301.00
▷ Minimum class complexity244.00
▷ Maximum class complexity358.00
Average method complexity10.84
▷ Minimum method complexity1.00
▷ Maximum method complexity180.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods61
▷ Static methods3150.82%
▷ Public methods61100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.10MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png57.12KB49.17KB▼ 13.90%
screenshot-1.png28.10KB22.29KB▼ 20.70%
screenshot-2.png21.04KB16.40KB▼ 22.07%