83% image-align-addon

Code Review | Image Wide align

WordPress plugin Image Wide align scored83%from 54 tests.

About plugin

  • Plugin page: image-align-addon
  • Plugin version: 1.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6
  • WordPress version: 6.3.1
  • First release: Jan 5, 2021
  • Latest release: Jan 5, 2021
  • Number of updates: 10
  • Update frequency: every 71.1 days
  • Top authors: hiteshverma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /470 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.01MB] [CPU: ▼5.29ms] Passed 4 tests

This is a short check of server-side resources used by Image Wide align
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0144.33 ▲1.72
Dashboard /wp-admin3.32 ▲0.0150.48 ▼3.76
Posts /wp-admin/edit.php3.37 ▲0.0154.07 ▲5.11
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.10 ▼19.62
Media Library /wp-admin/upload.php3.24 ▲0.0139.25 ▲0.52

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Wide align
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.23 ▼0.121.72 ▼0.3945.28 ▲5.99
Dashboard /wp-admin2,198 ▲305.64 ▲0.0491.16 ▼0.8542.09 ▼7.26
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0341.94 ▲3.7336.66 ▼0.98
Add New Post /wp-admin/post-new.php1,526 ▼1123.15 ▲4.68666.46 ▲1.6751.59 ▼19.08
Media Library /wp-admin/upload.php1,400 ▲34.16 ▼0.08102.81 ▼2.5547.76 ▲2.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/image-align-addon/Image_wide_align.php:17

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 80% 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: Please fix this invalid URI: "hitesh.verma0@gmail.com"
Please take inspiration from this readme.txt

image-align-addon/Image_wide_align.php 62% from 13 tests

The main file in "Image Wide align" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 164 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("#")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("image-align-addon.php" instead of "Image_wide_align.php")
  • Domain Path: Prefix the domain path with a forward slash character ("/#")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin80 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS113651
PHP171429

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin