90% wp-wrap-images

Code Review | WP Wrap Images

WordPress plugin WP Wrap Images scored90%from 54 tests.

About plugin

  • Plugin page: wp-wrap-images
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8.3
  • WordPress version: 6.3.1
  • First release: Nov 10, 2017
  • Latest release: Jan 7, 2018
  • Number of updates: 7
  • Update frequency: every 8.3 days
  • Top authors: jajanowiak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,009 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by WP Wrap Images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.39 ▼0.31
Dashboard /wp-admin3.33 ▲0.0349.08 ▼2.30
Posts /wp-admin/edit.php3.38 ▲0.0244.40 ▼0.67
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.21 ▲5.46
Media Library /wp-admin/upload.php3.25 ▲0.0233.75 ▲1.13

Server storage [IO: ▲0.01MB] [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: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WP Wrap Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.23 ▼1.392.18 ▲0.5145.17 ▲1.00
Dashboard /wp-admin2,206 ▲325.90 ▲0.00102.48 ▼4.5439.91 ▼3.55
Posts /wp-admin/edit.php2,089 ▼32.05 ▼0.0137.25 ▼6.4634.04 ▼0.95
Add New Post /wp-admin/post-new.php1,534 ▲1423.34 ▲0.16587.41 ▼87.0747.25 ▼25.38
Media Library /wp-admin/upload.php1,382 ▼34.17 ▲0.0195.95 ▼4.3641.63 ▼4.39

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 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
4 plugin tags: images, shortcodes, wysiwyg, media

wp-wrap-images/wp-wrap-images.php Passed 13 tests

"WP Wrap Images" version 0.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
58 characters long description:
Wrap all images inserted into the WYSIWYG in a figure tag,

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected131 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2367789
Markdown114042

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin