83% awesome-widget-gallery

Code Review | Awesome Widget Gallery

WordPress plugin Awesome Widget Gallery scored83%from 54 tests.

About plugin

  • Plugin page: awesome-widget-ga...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Mar 27, 2017
  • Latest release: Jan 17, 2019
  • Number of updates: 6
  • Update frequency: every 109.3 days
  • Top authors: raihancse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /643 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.11ms] Passed 4 tests

A check of server-side resources used by Awesome Widget Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.20 ▼0.60
Dashboard /wp-admin3.34 ▲0.0445.01 ▼10.84
Posts /wp-admin/edit.php3.40 ▲0.0448.74 ▼0.63
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.88 ▼6.71
Media Library /wp-admin/upload.php3.27 ▲0.0435.01 ▼2.26

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_flickr_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Awesome Widget Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲614.40 ▼0.121.54 ▼0.3439.35 ▲5.06
Dashboard /wp-admin2,198 ▲245.64 ▼0.0389.05 ▼8.6438.67 ▼4.21
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0139.74 ▲6.8836.89 ▲4.33
Add New Post /wp-admin/post-new.php1,534 ▲618.29 ▼4.74593.69 ▼78.6178.95 ▲20.20
Media Library /wp-admin/upload.php1,394 ▼94.17 ▼0.0194.77 ▼8.1947.86 ▲6.94

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_flickr_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/awesome-widget-gallery/index.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #5 (This is the fifth screen shot), #6 (This is the sixth screen shot), #7 (This is the seven screen shot)
  • Plugin Name: Please specify the plugin name on the first line ( === awesome-widget-gallery === )
The official readme.txt might help

awesome-widget-gallery/index.php 92% from 13 tests

The main PHP file in "Awesome Widget Gallery" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("awesome-widget-gallery.php" instead of "index.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
There were no executable files found in this plugin149 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13113149

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin