84% svg-featured-image

Code Review | SVG Featured Image

WordPress plugin SVG Featured Image scored84%from 54 tests.

About plugin

  • Plugin page: svg-featured-image
  • Plugin version: 0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2019
  • Latest release: Oct 28, 2019
  • Number of updates: 7
  • Update frequency: every 4.9 days
  • Top authors: n1rus (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /778 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.66ms] Passed 4 tests

A check of server-side resources used by SVG Featured Image
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0342.00 ▲3.85
Dashboard /wp-admin3.36 ▲0.0553.03 ▼2.97
Posts /wp-admin/edit.php3.41 ▲0.0552.76 ▼0.82
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.54 ▼11.97
Media Library /wp-admin/upload.php3.28 ▲0.0534.32 ▼2.88

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by SVG Featured Image
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲18814.16 ▼0.392.16 ▲0.5343.42 ▼0.28
Dashboard /wp-admin2,334 ▲1575.69 ▲0.0987.73 ▼3.5338.66 ▼2.31
Posts /wp-admin/edit.php2,235 ▲1352.05 ▲0.0235.19 ▼6.1539.27 ▲1.50
Add New Post /wp-admin/post-new.php1,555 ▲2423.44 ▲0.32683.64 ▼17.5353.23 ▼7.15
Media Library /wp-admin/upload.php1,538 ▲1384.25 ▲0.1199.82 ▼9.6647.97 ▲0.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/svg-featured-image/svg_png_featured.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/svg-featured-image/settings-view.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/svg-featured-image/post-watch.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/svg-featured-image/meta-tags.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
8 plugin tags: plugin, facebook, opengraph, twitter, svg...

svg-featured-image/svg_png_featured.php 85% from 13 tests

The principal PHP file in "SVG Featured Image" v. 0.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("svg-featured-image.php" instead of "svg_png_featured.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin288 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP56916252
CSS14018
Markdown16011
SVG3007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions10
▷ Named functions10100.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
PNG images were not found in this plugin