84% easy-svg-image-allow

Code Review | Easy SVG Allow

WordPress plugin Easy SVG Allow scored84%from 54 tests.

About plugin

  • Plugin page: easy-svg-image-allow
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2018
  • Latest release: Dec 14, 2018
  • Number of updates: 3
  • Update frequency: every 13.0 days
  • Top authors: osamabaqi123 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /642 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.00MB] [CPU: ▼6.94ms] Passed 4 tests

This is a short check of server-side resources used by Easy SVG Allow
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.28 ▼1.18
Dashboard /wp-admin3.31 ▲0.0144.93 ▼7.32
Posts /wp-admin/edit.php3.36 ▲0.0047.37 ▼2.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.97 ▼16.85
Media Library /wp-admin/upload.php3.23 ▲0.0036.20 ▲2.45

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy SVG Allow
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.29 ▼1.094.52 ▲2.5542.04 ▼5.99
Dashboard /wp-admin2,206 ▲184.85 ▼0.04105.88 ▼10.7941.29 ▼1.95
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0439.69 ▲5.9035.47 ▼0.03
Add New Post /wp-admin/post-new.php1,534 ▲1423.14 ▼0.13657.80 ▼18.7455.85 ▼0.61
Media Library /wp-admin/upload.php1,391 ▲94.20 ▼0.02100.71 ▲2.1940.78 ▼1.81

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-svg-image-allow/easy_svg_image_allow.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: svg allow, svg, svg support

easy-svg-image-allow/easy_svg_image_allow.php 92% from 13 tests

The main PHP script in "Easy SVG Allow" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-svg-image-allow.php" instead of "easy_svg_image_allow.php")

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
No dangerous file extensions were detected9 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13129

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected