84% rating-builder

Code Review | Rating Builder

WordPress plugin Rating Builder scored 84% from 54 tests.

About plugin

  • Plugin page: rating-builder
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: May 9, 2017
  • Latest release: Jan 9, 2018
  • Number of updates: 15
  • Update frequency: every 16.4 days
  • Top authors: redq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 822 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
Installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼1.21ms] Passed 4 tests

This is a short check of server-side resources used by Rating Builder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3644.61 ▼0.91
Dashboard /wp-admin3.54 ▲0.2450.16 ▲4.19
Posts /wp-admin/edit.php3.65 ▲0.3051.88 ▲8.08
Add New Post /wp-admin/post-new.php6.14 ▲0.2683.83 ▼13.07
Media Library /wp-admin/upload.php3.46 ▲0.2437.22 ▲4.97
Rating /wp-admin/edit.php?post_type=redq_rb_post3.5146.05
Add New /wp-admin/post-new.php?post_type=redq_rb_post3.5040.04

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 144 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
webpack_public_path_url
widget_recent-posts
reactive_builder_admin_notices
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Rating Builder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,290 ▲53317.90 ▲3.3137.73 ▲35.5643.84 ▼2.98
Dashboard /wp-admin2,271 ▲806.61 ▲1.74112.24 ▲6.9840.68 ▼2.87
Posts /wp-admin/edit.php2,162 ▲733.67 ▲1.6750.04 ▲13.5137.07 ▲5.28
Add New Post /wp-admin/post-new.php1,572 ▲3918.57 ▼4.59608.43 ▼64.8834.44 ▼17.54
Media Library /wp-admin/upload.php1,456 ▲685.98 ▲1.7699.13 ▼6.0044.46 ▲1.57
Rating /wp-admin/edit.php?post_type=redq_rb_post1,1323.6242.5127.15
Add New /wp-admin/post-new.php?post_type=redq_rb_post1,6326.1693.55380.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • webpack_public_path_url
    • widget_recent-posts
    • can_compress_scripts
    • reactive_builder_admin_notices
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/rating-builder/rating-builder.php:138
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/rating-builder/includes/admin/rating-builder-array.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in rating-builder/assets to your readme.txt
You can take inspiration from this readme.txt

rating-builder/rating-builder.php 92% from 13 tests

The primary PHP file in "Rating Builder" version 1.0.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin4,094 lines of code in 138 files:
LanguageFilesBlank linesComment linesLines of code
CSS736212,350
PHP161212031,072
JavaScript109629351
LESS13511169
JSON500152

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity15.27
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods53
▷ Static methods713.21%
▷ Public methods5298.11%
▷ Protected methods00.00%
▷ Private methods11.89%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants8
▷ Global constants8100.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 are no PNG files in this plugin