84% dl-imgbanner-widget

Code Review | DL IMGBanner Widget

WordPress plugin DL IMGBanner Widget scored84%from 54 tests.

About plugin

  • Plugin page: dl-imgbanner-widget
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.6
  • WordPress version: 6.3.1
  • First release: Jan 29, 2014
  • Latest release: Aug 28, 2016
  • Number of updates: 21
  • Update frequency: every 44.9 days
  • Top authors: dyadyalesha (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,325 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.10ms] Passed 4 tests

Analyzing server-side resources used by DL IMGBanner Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.29 ▲2.43
Dashboard /wp-admin3.33 ▲0.0359.70 ▲12.00
Posts /wp-admin/edit.php3.45 ▲0.1058.18 ▲10.73
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.30 ▼16.76
Media Library /wp-admin/upload.php3.24 ▲0.0137.14 ▲3.99

Server storage [IO: ▲0.10MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_dl_imgbanner_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

DL IMGBanner Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲16714.38 ▼0.022.12 ▲0.2945.07 ▲1.94
Dashboard /wp-admin2,331 ▲1516.14 ▲0.52110.81 ▲17.1840.66 ▼2.12
Posts /wp-admin/edit.php2,262 ▲1593.36 ▲1.3656.15 ▲19.4337.75 ▼0.79
Add New Post /wp-admin/post-new.php1,528 ▼923.46 ▲5.02643.21 ▲31.2138.02 ▼36.66
Media Library /wp-admin/upload.php1,396 ▼44.13 ▼0.0681.78 ▼13.8041.64 ▼3.46

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_dl_imgbanner_widget
    • widget_recent-posts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dl-imgbanner-widget/dl-imgbanner-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Настройки виджета)
The official readme.txt might help

dl-imgbanner-widget/dl-imgbanner-widget.php Passed 13 tests

The principal PHP file in "DL IMGBanner Widget" v. 1.2 is loaded by WordPress automatically on each request
96 characters long description:
Удобный и простой способ добавить баннер на Ваш сайт

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 plugin175 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12811148
JavaScript111227

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity5.20
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png94.24KB52.23KB▼ 44.58%