84% bpwp-set-homepages

Code Review | BPWP Set Homepages

WordPress plugin BPWP Set Homepages scored84%from 54 tests.

About plugin

  • Plugin page: bpwp-set-homepages
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 9, 2022
  • Latest release: Sep 9, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: biliplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /156 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.50ms] Passed 4 tests

An overview of server-side resources used by BPWP Set Homepages
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.83 ▼0.74
Dashboard /wp-admin3.31 ▲0.0147.85 ▼4.55
Posts /wp-admin/edit.php3.37 ▲0.0150.34 ▲1.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.84 ▼18.46
Media Library /wp-admin/upload.php3.24 ▲0.0137.65 ▲3.05

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for BPWP Set Homepages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.22 ▼1.141.66 ▼0.4342.10 ▼2.10
Dashboard /wp-admin2,209 ▲215.84 ▼0.04100.16 ▼4.9239.79 ▼4.91
Posts /wp-admin/edit.php2,086 ▼32.04 ▲0.0335.11 ▼5.5830.84 ▼3.77
Add New Post /wp-admin/post-new.php1,514 ▼1917.60 ▼5.56652.69 ▲50.6353.41 ▲0.18
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0595.32 ▼3.6040.34 ▼3.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bpwp-set-homepages/bpwp-set-homepages.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: homepages, users

bpwp-set-homepages/bpwp-set-homepages.php Passed 13 tests

The main PHP script in "BPWP Set Homepages" version 1.0.0 is automatically included on every request by WordPress
45 characters long description:
Set a different homepage for logged-in users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected159 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP34094109
PO File17933
Markdown14017

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.68
Average class complexity8.00
▷ Minimum class complexity6.00
▷ Maximum class complexity10.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin