78% stock-images

Code Review | Stock Images

WordPress plugin Stock Images scored78%from 54 tests.

About plugin

  • Plugin page: stock-images
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2016
  • Latest release: Jun 19, 2016
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: pbimal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /805 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
The plugin installed gracefully, with no errors

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

Server-side resources used by Stock Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.37 ▲0.86
Dashboard /wp-admin3.33 ▲0.0347.46 ▼6.30
Posts /wp-admin/edit.php3.38 ▲0.0349.45 ▼0.09
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.26 ▼11.88
Media Library /wp-admin/upload.php3.25 ▲0.0335.79 ▲1.42

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
stock_images_api
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Stock Images
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.18 ▼0.171.73 ▼0.4642.88 ▼1.62
Dashboard /wp-admin2,198 ▲215.64 ▲0.0388.61 ▲2.1138.79 ▼4.30
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0038.61 ▲2.1635.08 ▼3.52
Add New Post /wp-admin/post-new.php1,526 ▼023.38 ▲0.20675.80 ▼16.6058.54 ▲1.85
Media Library /wp-admin/upload.php1,391 ▼64.17 ▼0.0399.38 ▼18.0340.87 ▼4.55

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
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/stock-images/index.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/stock-images/classes/class.stock_images.inc.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Setup)
You can look at the official readme.txt

stock-images/stock-images.php 92% from 13 tests

The primary PHP file in "Stock Images" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 312 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin99 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3252299

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions0
▷ Named functions00.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 images were found in this plugin