72% accesspress-pinterest

Code Review | PI Button

WordPress plugin PI Button scored 72% from 54 tests.

About plugin

  • Plugin page: accesspress-pinte...
  • Plugin version: 3.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 5.9.2
  • First release: Mar 13, 2015
  • Latest release: Dec 12, 2021
  • Number of updates: 88
  • Update frequency: every 28.0 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

5,000+ active / 145,484 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼301.62ms] Passed 4 tests

Analyzing server-side resources used by PI Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1358.63 ▲1.46
Dashboard /wp-admin3.48 ▲0.0838.17 ▲2.77
Posts /wp-admin/edit.php3.71 ▲0.0743.40 ▲5.83
Add New Post /wp-admin/post-new.php7.01 ▲0.0394.68 ▼1,211.92
Media Library /wp-admin/upload.php3.42 ▲0.1325.57 ▲1.22
PI Button /wp-admin/admin.php?page=accesspress-pinterest3.4925.84
Check Premium Version /wp-admin/admin.php?page=appinterest-premium3.1617.30
Documentation /wp-admin/admin.php?page=appinterest-doclinks3.1617.86

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
widget_apsp_single_image_pin_widget_free
widget_apsp_latest_pins_widget_free
apsp-settings
widget_apsp_board_widget_free
widget_apsp_profile_widget_free
widget_apsp_follow_widget_free

Browser metrics Passed 4 tests

PI Button: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,969 ▲22418.27 ▲2.7318.62 ▲12.282.66 ▲0.37
Dashboard /wp-admin2,937 ▲766.21 ▲0.04140.94 ▼13.26187.65 ▲22.16
Posts /wp-admin/edit.php2,693 ▲73.12 ▼0.1263.31 ▼2.44154.49 ▼51.51
Add New Post /wp-admin/post-new.php1,777 ▲11421.25 ▲1.73404.94 ▼29.36230.90 ▲64.78
Media Library /wp-admin/upload.php1,730 ▲355.56 ▲0.08138.52 ▼14.62245.21 ▲18.73
PI Button /wp-admin/admin.php?page=accesspress-pinterest3,1258.51207.22206.39
Check Premium Version /wp-admin/admin.php?page=appinterest-premium2,92117.66567.46277.70
Documentation /wp-admin/admin.php?page=appinterest-doclinks1,7038.74293.06168.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_apsp_board_widget_free
    • widget_apsp_single_image_pin_widget_free
    • widget_apsp_profile_widget_free
    • widget_apsp_follow_widget_free
    • widget_apsp_latest_pins_widget_free
    • apsp-settings

Smoke tests 25% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 11× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/accesspress-pinterest/inc/frontend/apsp_share.php
    • > /wp-content/plugins/accesspress-pinterest/inc/frontend/latest-pins-shortcode.php
    • > /wp-content/plugins/accesspress-pinterest/inc/frontend/pin-widget-shortcode.php
    • > /wp-content/plugins/accesspress-pinterest/inc/frontend/profile-shortcode.php
    • > /wp-content/plugins/accesspress-pinterest/inc/frontend/follow-shortcode.php
    • > /wp-content/plugins/accesspress-pinterest/inc/backend/widget.php
    • > /wp-content/plugins/accesspress-pinterest/inc/backend/activation.php
    • > /wp-content/plugins/accesspress-pinterest/inc/backend/save-settings.php
    • > /wp-content/plugins/accesspress-pinterest/inc/backend/main-page.php
    • > /wp-content/plugins/accesspress-pinterest/inc/frontend/board-shortcode.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/accesspress-pinterest/inc/frontend/save_button_shortcode.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accesspress-pinterest/inc/backend/how-to-use.php:1
    • > PHP Notice
      Trying to get property 'post_title' of non-object in wp-content/plugins/accesspress-pinterest/inc/frontend/save_button_shortcode.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accesspress-pinterest/inc/backend/apsp-about.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=appinterest-premium
    • > Javascript (severe) in unknown
    https://accesspressthemes.com/wordpress-plugins/accesspress-pinterest-pro/ - Access to script at 'https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms' from origin 'https://accesspressthemes.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=appinterest-doclinks
    • > Network (severe)
    https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/admin.php?page=appinterest-doclinks
    • > Javascript (severe) in unknown
    https://accesspressthemes.com/documentation/accesspress-pinterest/ - Access to script at 'https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms' from origin 'https://accesspressthemes.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can take inspiration from this readme.txt

accesspress-pinterest/accesspress-pinterest.php Passed 13 tests

The principal PHP file in "PI Button" v. 3.3.4 is loaded by WordPress automatically on each request
96 characters long description:
A plugin to add various pinterest widgets and pins to a site with dynamic configuration options.

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 plugin4,686 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP151992181,498
CSS37218457
JavaScript381260

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity24.67
▷ Minimum class complexity7.00
▷ Maximum class complexity79.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods49100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 1.41MB with 0.89MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/upgrade-btn.png1.92KB0.52KB▼ 73.18%
images/twitter.png1.74KB0.81KB▼ 53.33%
images/flicker.png1.45KB0.57KB▼ 60.47%
images/aplite.png6.73KB3.22KB▼ 52.21%
images/apsp-icon.png1.24KB0.30KB▼ 76.12%