89% rating-block-layouts

Code Review | Rating Layouts

WordPress plugin Rating Layouts scored89%from 54 tests.

About plugin

  • Plugin page: rating-block-layouts
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.1
  • WordPress version: 6.3.1
  • First release: May 7, 2021
  • Latest release: May 7, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: chinteshprajapati (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /309 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Rating Layouts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.27 ▼1.35
Dashboard /wp-admin3.32 ▲0.0156.95 ▲1.21
Posts /wp-admin/edit.php3.37 ▲0.0153.68 ▼1.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.03 ▼32.47
Media Library /wp-admin/upload.php3.25 ▲0.0236.03 ▼2.21

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Rating Layouts: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16619.64 ▲5.292.43 ▲0.6643.95 ▲3.93
Dashboard /wp-admin2,289 ▲989.76 ▲4.84261.89 ▲155.7940.46 ▼5.16
Posts /wp-admin/edit.php2,168 ▲799.28 ▲7.1786.00 ▲46.6037.67 ▲1.75
Add New Post /wp-admin/post-new.php6,191 ▲4,66319.02 ▲0.72767.71 ▲106.2440.54 ▼13.26
Media Library /wp-admin/upload.php1,492 ▲10711.07 ▲6.82133.37 ▲13.7843.81 ▼3.42

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: rating, layouts, gutenbarge, block, heart rating...

rating-block-layouts/rating-layouts.php 77% from 13 tests

The primary PHP file in "Rating Layouts" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rating-block-layouts.php" instead of "rating-layouts.php")

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
Success! There were no dangerous files found in this plugin24 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3105023
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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