90% effata-widget-areas

Code Review | Effata Widget Areas

WordPress plugin Effata Widget Areas scored90%from 54 tests.

About plugin

  • Plugin page: effata-widget-areas
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: May 12, 2021
  • Latest release: Sep 7, 2021
  • Number of updates: 8
  • Update frequency: every 14.9 days
  • Top authors: effatainc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /538 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼1.49ms] Passed 4 tests

This is a short check of server-side resources used by Effata Widget Areas
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.89 ▼7.62
Dashboard /wp-admin3.50 ▲0.1953.35 ▲1.61
Posts /wp-admin/edit.php3.55 ▲0.1954.55 ▲1.51
Add New Post /wp-admin/post-new.php6.11 ▲0.2296.62 ▲1.25
Media Library /wp-admin/upload.php3.43 ▲0.1939.43 ▼1.09
Widget Areas /wp-admin/edit.php?post_type=widget_area3.4740.62

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Effata Widget Areas
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲1114.36 ▼0.011.69 ▼0.4841.86 ▼1.98
Dashboard /wp-admin2,200 ▲295.58 ▼0.1288.41 ▼15.6138.09 ▼6.55
Posts /wp-admin/edit.php2,108 ▲82.14 ▲0.1239.09 ▲1.1935.13 ▲0.50
Add New Post /wp-admin/post-new.php1,542 ▲1618.15 ▼4.83637.72 ▼1.3172.54 ▲18.19
Media Library /wp-admin/upload.php1,411 ▲114.26 ▲0.0696.62 ▼2.3143.72 ▲1.23
Widget Areas /wp-admin/edit.php?post_type=widget_area1,0991.9831.0032.03

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: widgetareas, areas, area, organize, widget...

effata-widget-areas/effata-widget-areas.php Passed 13 tests

"Effata Widget Areas" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
35 characters long description:
Plugin for controlling the sidebar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,094 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4107264803
PO File17880188
CSS1141257
JavaScript13046

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity55.50
▷ Minimum class complexity6.00
▷ Maximum class complexity136.00
Average method complexity9.07
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods13.70%
▷ Public methods2696.30%
▷ Protected methods00.00%
▷ Private methods13.70%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants228.57%
▷ Class constants571.43%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png12.66KB5.97KB▼ 52.80%
screenshot-2.png45.85KB21.62KB▼ 52.84%