78% imagebrico

Code Review | iMage Brico

WordPress plugin iMage Brico scored78%from 54 tests.

About plugin

  • Plugin page: imagebrico
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Jun 7, 2016
  • Latest release: Jun 8, 2016
  • Number of updates: 6
  • Update frequency: every 4.8 days
  • Top authors: imagebrico (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /867 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.02MB] [CPU: ▼6.17ms] Passed 4 tests

An overview of server-side resources used by iMage Brico
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.51 ▼7.94
Dashboard /wp-admin3.32 ▲0.0245.14 ▼6.84
Posts /wp-admin/edit.php3.37 ▲0.0247.97 ▲1.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.77 ▼6.57
Media Library /wp-admin/upload.php3.24 ▲0.0236.20 ▼3.31

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 83 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by iMage Brico
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.181.78 ▼0.1243.86 ▼3.26
Dashboard /wp-admin2,206 ▲175.89 ▲0.99106.60 ▼11.0238.02 ▼10.49
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0035.01 ▼2.6431.58 ▼4.75
Add New Post /wp-admin/post-new.php1,514 ▼517.69 ▼5.87680.63 ▲18.8147.00 ▼0.69
Media Library /wp-admin/upload.php1,391 ▼04.41 ▲0.1996.85 ▼0.7842.67 ▼1.97

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 did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/imagebrico/pluginLoader.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/imagebrico/iMageBrico.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt might help

imagebrico/iMageBrico.php 92% from 13 tests

The entry point to "iMage Brico" version 0.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("imagebrico.php" instead of "iMageBrico.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected923 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript28079628
SVG222108
PHP272467
CSS25251
XML30040
HTML12027
INI1002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
56 PNG files occupy 0.62MB with 0.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
swf/img/divider_vertical.png26.55KB0.09KB▼ 99.68%
swf/components/ColorPic/assets/spectrum.png32.49KB9.43KB▼ 70.97%
swf/img/feedback.png1.23KB0.48KB▼ 61.27%
swf/img/inner_shadow.png1.08KB0.15KB▼ 85.95%
swf/img/layers.png3.41KB0.66KB▼ 80.67%