78% exclude-these

Code Review | exclude-these

WordPress plugin exclude-these scored78%from 54 tests.

About plugin

  • Plugin page: exclude-these
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.7
  • WordPress version: 6.3.1
  • First release: Mar 27, 2021
  • Latest release: Mar 27, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: nustunr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /321 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.48MB] [CPU: ▼22.54ms] Passed 4 tests

An overview of server-side resources used by exclude-these
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▼0.5920.31 ▼21.02
Dashboard /wp-admin3.29 ▼0.0145.91 ▼5.61
Posts /wp-admin/edit.php3.23 ▼0.1229.22 ▼22.37
Add New Post /wp-admin/post-new.php4.69 ▼1.1957.83 ▼41.14
Media Library /wp-admin/upload.php3.32 ▲0.1035.51 ▼4.03
exclude-these /wp-admin/options-general.php?page=exclude-these3.2731.69

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for exclude-these
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.41 ▼0.231.69 ▼0.2943.52 ▲2.16
Dashboard /wp-admin2,196 ▲195.55 ▼0.0589.86 ▼0.2340.60 ▼5.54
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0334.25 ▼1.1233.02 ▼6.73
Add New Post /wp-admin/post-new.php1,529 ▲323.48 ▲0.36656.11 ▼32.1049.59 ▼0.52
Media Library /wp-admin/upload.php1,407 ▲74.19 ▼0.04102.37 ▼4.9647.23 ▲0.05
exclude-these /wp-admin/options-general.php?page=exclude-these1,6452.1226.2837.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 105 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=exclude-these
    • > Notice in wp-content/plugins/exclude-these/plugin.php+577
    Trying to access array offset on value of type bool

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 take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/exclude-these/plugin.php on line 14
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/exclude-these/plugin.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/exclude-these/plugin.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Requires php: The plugin version is formatted incorrectly
You can look at the official readme.txt

exclude-these/plugin.php 92% from 13 tests

"exclude-these" version 1.0'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: Please rename the main PHP file in this plugin to the plugin slug ("exclude-these.php" instead of "plugin.php")

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
No dangerous file extensions were detected683 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP122892683

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity20.00
▷ Minimum method complexity20.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin