78% article-gallery-slider

Code Review | Article Gallery Slider

WordPress plugin Article Gallery Slider scored78%from 54 tests.

About plugin

  • Plugin page: article-gallery-s...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Feb 26, 2016
  • Latest release: Feb 21, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: module.express (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,478 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.24ms] Passed 4 tests

This is a short check of server-side resources used by Article Gallery Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0954.29 ▲7.58
Dashboard /wp-admin3.38 ▲0.0851.35 ▼5.42
Posts /wp-admin/edit.php3.43 ▲0.0853.61 ▲3.42
Add New Post /wp-admin/post-new.php5.97 ▲0.0890.73 ▼10.71
Media Library /wp-admin/upload.php3.31 ▲0.0843.38 ▲3.75
Gallery showcases /wp-admin/edit.php?post_type=sp_article_gallery&page=responsive_gallery-cgs-bar-submenu-page3.2735.74
All Images /wp-admin/edit.php?post_type=sp_article_gallery3.3540.45
Gallery Category /wp-admin/edit-tags.php?taxonomy=responsive_cgs_slider-category&post_type=sp_article_gallery3.3037.20
Add New /wp-admin/post-new.php?post_type=sp_article_gallery3.4352.63

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

Browser metrics Passed 4 tests

An overview of browser requirements for Article Gallery Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲18313.48 ▼0.888.43 ▲6.6642.50 ▼0.68
Dashboard /wp-admin2,230 ▲535.58 ▼0.0188.90 ▼17.7040.57 ▼2.85
Posts /wp-admin/edit.php2,135 ▲382.01 ▲0.0333.59 ▼4.9635.31 ▲5.13
Add New Post /wp-admin/post-new.php1,558 ▲3223.00 ▼0.22661.97 ▼50.0352.26 ▼5.27
Media Library /wp-admin/upload.php1,438 ▲414.12 ▼0.04110.06 ▲2.1447.02 ▼1.59
Gallery showcases /wp-admin/edit.php?post_type=sp_article_gallery&page=responsive_gallery-cgs-bar-submenu-page8341.9923.1830.93
All Images /wp-admin/edit.php?post_type=sp_article_gallery1,1191.9731.0731.52
Gallery Category /wp-admin/edit-tags.php?taxonomy=responsive_cgs_slider-category&post_type=sp_article_gallery1,2922.2427.7732.22
Add New /wp-admin/post-new.php?post_type=sp_article_gallery2,3407.68172.2668.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/article-gallery-slider/article-gallery-slider.php:329
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/article-gallery-slider/designs/template.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/article-gallery-slider/cgs_gallery_admin_settings_center.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=sp_article_gallery&page=responsive_gallery-cgs-bar-submenu-page
    • > Network (severe)
    wp-content/plugins/article-gallery-slider/images/design-1.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Designs Views from admin side), #2 (Catagroies shortcode)
The official readme.txt might help

article-gallery-slider/article-gallery-slider.php Passed 13 tests

The main PHP script in "Article Gallery Slider" version 1.0 is automatically included on every request by WordPress
42 characters long description:
A simple Responsive Article Gallery Slider

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,859 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1207171,293
PHP35925290
CSS44918276

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/grabbing.png0.11KB0.14KB0.00%
images/icon_total_01.png24.31KB9.78KB▼ 59.76%