84% brandreward

Code Review | Brandreward

WordPress plugin Brandreward scored84%from 54 tests.

About plugin

  • Plugin page: brandreward
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.7.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2016
  • Latest release: Jan 18, 2017
  • Number of updates: 15
  • Update frequency: every 18.7 days
  • Top authors: brandreward (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,474 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.00MB] [CPU: ▼7.01ms] Passed 4 tests

Server-side resources used by Brandreward
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.14 ▼6.02
Dashboard /wp-admin3.32 ▼0.0346.40 ▼11.80
Posts /wp-admin/edit.php3.37 ▲0.0148.35 ▲3.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0177.71 ▼13.81
Media Library /wp-admin/upload.php3.24 ▲0.0137.30 ▲3.60
Brandreward /wp-admin/options-general.php?page=brandreward-3.2126.76

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

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

Browser metrics Passed 4 tests

Brandreward: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.25 ▼1.121.67 ▼0.6439.54 ▼7.91
Dashboard /wp-admin2,210 ▲224.84 ▼1.06115.56 ▲0.2041.93 ▼0.53
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0238.78 ▲2.6933.66 ▼5.12
Add New Post /wp-admin/post-new.php1,531 ▼1118.04 ▼0.24654.58 ▲22.5349.74 ▼0.93
Media Library /wp-admin/upload.php1,392 ▲14.21 ▼0.15101.55 ▲1.7740.32 ▼4.45
Brandreward /wp-admin/options-general.php?page=brandreward-7892.0525.1623.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/brandreward/brandreward.php:32

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (The page you copy and paste your SITE ID in Brandreward site.)
You can take inspiration from this readme.txt

brandreward/brandreward.php 92% from 13 tests

"Brandreward" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 319 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin68 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1203168

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png48.85KB19.66KB▼ 59.75%