78% b-reputation-reviews

Code Review | B-Reputation Reviews

WordPress plugin B-Reputation Reviews scored78%from 54 tests.

About plugin

  • Plugin page: b-reputation-reviews
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Nov 11, 2016
  • Latest release: Jul 2, 2018
  • Number of updates: 15
  • Update frequency: every 39.5 days
  • Top authors: carolinebda (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /1,744 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.63ms] Passed 4 tests

This is a short check of server-side resources used by B-Reputation Reviews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1837.26 ▼1.01
Dashboard /wp-admin3.37 ▲0.0645.29 ▼0.13
Posts /wp-admin/edit.php3.48 ▲0.1248.87 ▼3.32
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.92 ▼2.06
Media Library /wp-admin/upload.php3.29 ▲0.0636.00 ▲0.54
B-Reputation Settings /wp-admin/options-general.php?page=b_reputation3.2629.80

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for B-Reputation Reviews
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.26 ▼1.091.68 ▼0.0841.58 ▲0.31
Dashboard /wp-admin2,209 ▲185.79 ▼0.1295.77 ▼8.1637.82 ▼5.61
Posts /wp-admin/edit.php2,098 ▲92.02 ▼0.0440.09 ▼4.8236.39 ▼2.87
Add New Post /wp-admin/post-new.php1,533 ▲1923.04 ▲5.50654.20 ▼13.9961.46 ▲13.98
Media Library /wp-admin/upload.php1,397 ▲154.21 ▲0.0398.04 ▲0.8844.98 ▲0.23
B-Reputation Settings /wp-admin/options-general.php?page=b_reputation8112.0323.5824.65

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
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'b_reputation\\singleton' not found in wp-content/plugins/b-reputation-reviews/classes/frontdisplay.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/b-reputation-reviews/b-reputation.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'b_reputation\\singleton' not found in wp-content/plugins/b-reputation-reviews/classes/adminsettings.class.php:10
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/b-reputation-reviews/b-reputation.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/b-reputation-reviews/b-reputation.php on line 14

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=b_reputation
    • > Network (severe)
    wp-content/plugins/B-Reputation-Reviews/css/custom.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: feedback, reviews, b-reputation reviews, french, avis...

b-reputation-reviews/b-reputation.php 92% from 13 tests

This is the main PHP file of "B-Reputation Reviews" version 1.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("b-reputation-reviews.php" instead of "b-reputation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin170 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP45294136
CSS14034

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.67
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1275.00%
▷ Protected methods212.50%
▷ Private methods212.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin