10% hover-pin-it

Code Review | Hover Pin-It

WordPress plugin Hover Pin-It scored10%from 54 tests.

About plugin

  • Plugin page: hover-pin-it
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 4, 2012
  • Latest release: Oct 4, 2012
  • Number of updates: 7
  • Update frequency: every 3.0 days
  • Top authors: MichelleMacPhearson (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /7,790 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/hover-pin-it/hover-pin-it.php+134
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.31MB] [CPU: ▼19.96ms] Passed 4 tests

Server-side resources used by Hover Pin-It
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0135.02 ▼11.36
Dashboard /wp-admin3.32 ▲0.0246.20 ▼4.37
Posts /wp-admin/edit.php3.43 ▲0.0849.61 ▼0.35
Add New Post /wp-admin/post-new.php4.61 ▼1.2843.95 ▼60.57
Media Library /wp-admin/upload.php3.24 ▲0.0134.91 ▼3.54
Hover Pin-It /wp-admin/options-general.php?page=hover-pin-it/hover-pin-it.php3.2132.92

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Hover Pin-It
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12213.83 ▼0.7010.32 ▲8.5939.22 ▼7.78
Dashboard /wp-admin2,199 ▲225.64 ▲0.0094.39 ▼4.1642.77 ▲1.96
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0239.27 ▲0.8537.41 ▲2.18
Add New Post /wp-admin/post-new.php1,544 ▲1622.85 ▼0.21592.18 ▼87.9454.00 ▲1.04
Media Library /wp-admin/upload.php1,407 ▲104.21 ▼0.0299.43 ▼3.6041.88 ▼6.97
Hover Pin-It /wp-admin/options-general.php?page=hover-pin-it/hover-pin-it.php1,2072.0528.2029.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hover-pin-it/hover-pin-it.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

hover-pin-it/hover-pin-it.php Passed 13 tests

This is the main PHP file of "Hover Pin-It" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
59 characters long description:
Places a Pinterest Pin It button directly over your images.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,412 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22342551,315
JavaScript15897

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity143.00
▷ Minimum class complexity122.00
▷ Maximum class complexity164.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods77
▷ Static methods00.00%
▷ Public methods6179.22%
▷ Protected methods1620.78%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants19100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
pin-it-button-previews.png3.79KB2.46KB▼ 35.31%
pinterest.png4.73KB2.56KB▼ 45.75%