10% pinterest-pin-it-button

Code Review | Pinterest "Pin It" Button

WordPress plugin Pinterest "Pin It" Button scored 10% from 54 tests.

About plugin

  • Plugin page: pinterest-pin-it-...
  • Plugin version: 2.1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.2
  • WordPress version: 5.9.2
  • First release: Jan 6, 2012
  • Latest release: May 8, 2015
  • Number of updates: 164
  • Update frequency: every 7.6 days
  • Top authors: pderksen (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

7,000+ active / 474,124 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/pinterest-pin-it-button/includes/widgets.php+274
    Function create_function() is deprecated

Server metrics [RAM: ▼1.84MB] [CPU: ▼359.96ms] Passed 4 tests

This is a short check of server-side resources used by Pinterest "Pin It" Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.53 ▼0.999.20 ▼48.17
Dashboard /wp-admin2.55 ▼0.867.71 ▼32.51
Posts /wp-admin/edit.php2.55 ▼1.099.54 ▼89.06
Add New Post /wp-admin/post-new.php2.55 ▼4.427.85 ▼1,270.11
Media Library /wp-admin/upload.php2.53 ▼0.767.33 ▼19.78
Help /wp-admin/admin.php?page=pinterest-pin-it-button_help2.537.24
Upgrade to Pro /wp-admin/admin.php?page=pinterest-pin-it-button-upgrade2.537.29
Settings /wp-admin/admin.php?page=pinterest-pin-it-button2.5314.76

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 8 new options
New WordPress options
pib_upgrade_has_run
pib_settings_advanced
pib_settings_general
pib_settings_styles
pib_settings_post_visibility
pib_has_run
pib_version
widget_pib_button

Browser metrics Passed 4 tests

Pinterest "Pin It" Button: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,865 ▲11117.60 ▲2.0811.17 ▲4.742.25 ▼0.32
Dashboard /wp-admin2,958 ▲1057.47 ▲1.33125.90 ▼3.01177.18 ▲16.40
Posts /wp-admin/edit.php2,827 ▲1333.95 ▲0.71110.72 ▲46.12146.93 ▼12.12
Add New Post /wp-admin/post-new.php1,912 ▲22225.18 ▲4.19399.92 ▼58.74184.78 ▲26.88
Media Library /wp-admin/upload.php1,832 ▲1345.64 ▲0.17121.16 ▼23.79206.59 ▲15.38
Help /wp-admin/admin.php?page=pinterest-pin-it-button_help2,1452.3970.86194.02
Upgrade to Pro /wp-admin/admin.php?page=pinterest-pin-it-button-upgrade7000.940.0441.64
Settings /wp-admin/admin.php?page=pinterest-pin-it-button1,6372.4765.89138.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/pinterest-pin-it-button/includes/widgets.php+274
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 8 options in the database
    • pib_settings_styles
    • pib_settings_general
    • pib_settings_advanced
    • pib_upgrade_has_run
    • pib_settings_post_visibility
    • widget_pib_button
    • pib_has_run
    • pib_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pinterest-pin-it-button
    • > Deprecated in wp-content/plugins/pinterest-pin-it-button/includes/widgets.php+274
    Function create_function() is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pinterest-pin-it-button
    • > Notice in wp-content/plugins/pinterest-pin-it-button/includes/misc-functions.php+76
    Undefined variable: maxitems

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=pinterest-pin-it-button-upgrade
    • > Network (severe)
    http://pinplugins.com/?utm_source=pib_lite_2&utm_medium=plugin_menu&utm_campaign=pro_upgrade - Failed to load resource: the server responded with a status of 503 (Service Temporarily Unavailable)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Button display with count bubble beside), #2 (Button display with count bubble above), #3 (General button settings), #4 (Post visibility and placement settings), #5 (Style/CSS settings), #6 (Widget settings), #7 (Individual post (post meta) settings)
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

pinterest-pin-it-button/pinterest-pin-it-button.php 92% from 13 tests

The primary PHP file in "Pinterest "Pin It" Button" version 2.1.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin3,094 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP186679783,015
CSS218979

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity95.00
▷ Minimum class complexity18.00
▷ Maximum class complexity197.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods114
▷ Static methods43.51%
▷ Public methods9684.21%
▷ Protected methods1614.04%
▷ Private methods21.75%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants27100.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
12 PNG files occupy 0.17MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png18.27KB7.96KB▼ 56.42%
screenshot-1.png1.80KB1.31KB▼ 26.81%
screenshot-7.png18.37KB8.78KB▼ 52.20%
screenshot-6.png26.74KB11.05KB▼ 58.69%
screenshot-4.png31.89KB13.11KB▼ 58.89%