84% twpw-roll-over-gallery

Code Review | TWPW Roll Over Gallery

WordPress plugin TWPW Roll Over Gallery scored 84% from 54 tests.

About plugin

  • Plugin page: twpw-roll-over-ga...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 27, 2012
  • Latest release: Sep 28, 2012
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: CharlyLeetham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,057 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.69ms] Passed 4 tests

This is a short check of server-side resources used by TWPW Roll Over Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.41 ▼0.72
Dashboard /wp-admin3.36 ▲0.0547.52 ▼5.49
Posts /wp-admin/edit.php3.41 ▲0.0545.21 ▼0.80
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.21 ▲2.58
Media Library /wp-admin/upload.php3.28 ▲0.0533.89 ▼3.75
Roll Over Gallery /wp-admin/edit.php?post_type=rog3.3236.16
Roll Over Gallery Categories /wp-admin/edit-tags.php?taxonomy=rog_categories&post_type=rog3.2734.51
Add new Roll Over Gallery /wp-admin/post-new.php?post_type=rog3.4349.58

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for TWPW Roll Over Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲11713.40 ▼0.871.77 ▼0.1247.04 ▼3.04
Dashboard /wp-admin2,243 ▲554.84 ▲0.01104.85 ▼8.3537.32 ▼9.77
Posts /wp-admin/edit.php2,126 ▲372.00 ▼0.0539.49 ▲4.4734.38 ▼2.35
Add New Post /wp-admin/post-new.php1,546 ▼12117.83 ▼3.99652.67 ▼46.6465.18 ▲16.79
Media Library /wp-admin/upload.php1,422 ▲374.21 ▼0.04103.45 ▼0.0246.94 ▲2.28
Roll Over Gallery /wp-admin/edit.php?post_type=rog1,0902.0031.7731.55
Roll Over Gallery Categories /wp-admin/edit-tags.php?taxonomy=rog_categories&post_type=rog1,3022.2627.4828.26
Add new Roll Over Gallery /wp-admin/post-new.php?post_type=rog2,3277.65168.9067.30

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 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/twpw-roll-over-gallery/twpw_user_rog.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: spam, comments, remote comment spam

twpw-roll-over-gallery/twpw_user_rog.php 85% from 13 tests

"TWPW Roll Over Gallery" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 245 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("twpw-roll-over-gallery.php" instead of "twpw_user_rog.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 detected238 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11610162
CSS18745
JavaScript15131

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin