84% block-used-images

Code Review | Block used images

WordPress plugin Block used images scored84%from 54 tests.

About plugin

  • Plugin page: block-used-images
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2017
  • Latest release: Jul 25, 2017
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: dessainsaraiva (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.70MB] [CPU: ▼15.44ms] Passed 4 tests

Analyzing server-side resources used by Block used images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.81 ▲5.88
Dashboard /wp-admin3.32 ▼0.0357.28 ▼3.95
Posts /wp-admin/edit.php3.37 ▲0.0147.92 ▼2.64
Add New Post /wp-admin/post-new.php3.10 ▼2.7941.41 ▼61.05
Media Library /wp-admin/upload.php3.24 ▲0.0143.84 ▲8.99

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
recovery_mode_email_last_sent
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Block used images: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.30 ▼1.082.08 ▲0.4751.34 ▲12.69
Dashboard /wp-admin2,206 ▲155.90 ▼0.15102.35 ▲0.1738.03 ▼2.08
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0537.28 ▼3.6635.50 ▼1.15
Add New Post /wp-admin/post-new.php45 ▼1,4890.44 ▼22.640.09 ▼665.8312.70 ▼40.56
Media Library /wp-admin/upload.php1,385 ▼64.20 ▼0.0197.77 ▼6.3666.36 ▲19.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • can_compress_scripts

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-used-images/block-used-images.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Error message indicates the event that is using the message) image not found
You can look at the official readme.txt

block-used-images/block-used-images.php Passed 13 tests

"Block used images" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
82 characters long description:
Restricts users from using the same image from events that are currently happening

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin27 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1121727

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected