84% tw-image-hover-share

Code Review | Quantic Social Image Hover

WordPress plugin Quantic Social Image Hover scored 84% from 54 tests.

About plugin

  • Plugin page: tw-image-hover-share
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-1.0.8
  • WordPress version: 6.3.1
  • First release: Aug 5, 2015
  • Latest release: Nov 10, 2015
  • Number of updates: 9
  • Update frequency: every 13.0 days
  • Top authors: monkeyboz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 689 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.65ms] Passed 4 tests

An overview of server-side resources used by Quantic Social Image Hover
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.05192.32 ▲152.29
Dashboard /wp-admin3.34 ▲0.0343.84 ▼8.88
Posts /wp-admin/edit.php3.39 ▲0.0347.62 ▲3.80
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.82 ▲1.16
Media Library /wp-admin/upload.php3.26 ▲0.0333.18 ▼2.67

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
tw_social_buttons
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Quantic Social Image Hover
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲17413.70 ▼0.6510.66 ▲8.8037.35 ▼0.90
Dashboard /wp-admin2,222 ▲344.99 ▼0.87105.83 ▲6.4042.47 ▼5.89
Posts /wp-admin/edit.php2,105 ▲161.99 ▼0.0140.61 ▲1.5037.12 ▲3.06
Add New Post /wp-admin/post-new.php1,527 ▲1317.61 ▼4.13611.70 ▼91.7255.46 ▲0.41
Media Library /wp-admin/upload.php1,404 ▲224.22 ▲0.0396.47 ▼2.6740.84 ▼5.26

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • tw_social_buttons
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tw-image-hover-share/layout/scripts.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tw-image-hover-share/tw-image-hover.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/tw-image-hover-share/admin_page.php:44
    • > PHP Notice
      Undefined variable: pluginurl in wp-content/plugins/tw-image-hover-share/layout/scripts.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: image share hover, social networking hover, image hover

tw-image-hover-share/tw-image-hover.php 92% from 13 tests

The main PHP script in "Quantic Social Image Hover" version 1.0.8 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tw-image-hover-share.php" instead of "tw-image-hover.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected568 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3198339
JavaScript1374205
CSS10024

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions8
▷ Named functions8100.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
There are no PNG files in this plugin