84% card-flip-image-slideshow

Code Review | Card flip image slideshow

WordPress plugin Card flip image slideshow scored84%from 54 tests.

About plugin

  • Plugin page: card-flip-image-s...
  • Plugin version: 1.5
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2019
  • Latest release: Dec 1, 2022
  • Number of updates: 11
  • Update frequency: every 97.7 days
  • Top authors: gopiplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /920 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.29ms] Passed 4 tests

Analyzing server-side resources used by Card flip image slideshow
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1136.47 ▼6.44
Dashboard /wp-admin3.40 ▲0.1050.04 ▼3.74
Posts /wp-admin/edit.php3.52 ▲0.1655.60 ▼0.18
Add New Post /wp-admin/post-new.php5.99 ▲0.1091.04 ▼12.56
Media Library /wp-admin/upload.php3.33 ▲0.1038.58 ▼2.41
Card flip slideshow /wp-admin/options-general.php?page=card-flip-image-slideshow3.3433.93

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: 1 new table, 8 new options
New tables
wp_cardflip_slideshow
New WordPress options
widget_card-flip-image-slideshow
card-flip-image-slideshow
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Card flip image slideshow
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲14013.45 ▼0.858.48 ▲6.4640.43 ▼4.37
Dashboard /wp-admin2,199 ▲195.60 ▼0.0594.93 ▲0.3642.13 ▲0.12
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0040.03 ▲2.2638.33 ▲6.80
Add New Post /wp-admin/post-new.php1,529 ▼2017.66 ▼5.56668.37 ▼78.3955.11 ▲4.90
Media Library /wp-admin/upload.php1,401 ▲74.20 ▼0.01137.48 ▲34.9948.70 ▲2.81
Card flip slideshow /wp-admin/options-general.php?page=card-flip-image-slideshow1,0362.0127.0428.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_card-flip-image-slideshow
    • db_upgraded
    • theysaidso_admin_options

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/card-flip-image-slideshow/card-flip-image-slideshow.php
    • > /wp-content/plugins/card-flip-image-slideshow/pages/image-management-show.php
    • > /wp-content/plugins/card-flip-image-slideshow/pages/image-management-add.php
    • > /wp-content/plugins/card-flip-image-slideshow/pages/image-management-edit.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: slideshow, widget, plugin, image, gallery

card-flip-image-slideshow/card-flip-image-slideshow.php Passed 13 tests

The primary PHP file in "Card flip image slideshow" version 1.5 is used by WordPress to initiate all plugin functionality
83 characters long description:
Card flip image slideshow looks flipping card in the page. It uses hinge animation.

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
Success! There were no dangerous files found in this plugin1,284 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP713330896
JavaScript2210203
PO File15075115
CSS19070

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity13.75
▷ Minimum class complexity13.00
▷ Maximum class complexity15.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods1773.91%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/image-icon.png2.98KB0.54KB▼ 81.86%