84% wpbred-examples

Code Review | WP bred Examples

WordPress plugin WP bred Examples scored 84% from 54 tests.

About plugin

  • Plugin page: wpbred-examples
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7.2
  • WordPress version: 6.3.1
  • First release: Jul 20, 2021
  • Latest release: Jul 20, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: wpbred (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 291 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by WP bred Examples
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.45 ▲0.68
Dashboard /wp-admin3.32 ▲0.0247.29 ▲0.46
Posts /wp-admin/edit.php3.37 ▲0.0147.24 ▼3.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0199.97 ▲3.74
Media Library /wp-admin/upload.php3.24 ▲0.0137.97 ▼0.55
WPB Settings /wp-admin/options-general.php?page=wpb-settings3.2331.28

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP bred Examples
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.24 ▼1.071.69 ▲0.0142.42 ▼0.60
Dashboard /wp-admin2,210 ▲254.85 ▼0.97113.77 ▲2.0437.03 ▼5.59
Posts /wp-admin/edit.php2,093 ▲12.03 ▲0.0340.11 ▼2.8436.54 ▲1.84
Add New Post /wp-admin/post-new.php1,541 ▲2223.26 ▲0.03664.85 ▼24.5054.28 ▼5.05
Media Library /wp-admin/upload.php1,395 ▲74.18 ▲0.0498.28 ▼23.3745.12 ▼3.25
WPB Settings /wp-admin/options-general.php?page=wpb-settings7942.1625.6127.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wpbred-examples/admin/partials/wpbred-examples-admin-settings.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 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
2 plugin tags: comments, spam

wpbred-examples/wpbred-examples.php Passed 13 tests

"WP bred Examples" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
94 characters long description:
This plugin contains examples of the custom functions that can be added in a WordPress Plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin406 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PO File46060215
PHP784298180
Markdown18011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.25
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1680.00%
▷ Protected methods00.00%
▷ Private methods420.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin