78% bws-pinterest

Code Review | BestWebSoft’s Pinterest

WordPress plugin BestWebSoft’s Pinterest scored78%from 54 tests.

About plugin

  • Plugin page: bws-pinterest
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Apr 25, 2016
  • Latest release: Aug 11, 2023
  • Number of updates: 35
  • Update frequency: every 76.2 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active /23,042 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.55MB] [CPU: ▼8.54ms] Passed 4 tests

An overview of server-side resources used by BestWebSoft’s Pinterest
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.33 ▲0.8748.57 ▲2.42
Dashboard /wp-admin4.24 ▲0.9057.59 ▼6.98
Posts /wp-admin/edit.php4.29 ▲0.9360.00 ▲8.90
Add New Post /wp-admin/post-new.php5.46 ▼0.4355.01 ▼38.48
Media Library /wp-admin/upload.php4.10 ▲0.8750.82 ▲13.08

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 128 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
pntrst_options
bstwbsftwppdtplgns_options
theysaidso_admin_options
widget_pntrst-widget

Browser metrics Passed 4 tests

A check of browser resources used by BestWebSoft’s Pinterest
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,055 ▲29814.40 ▲0.0311.38 ▲9.3437.95 ▼11.75
Dashboard /wp-admin2,452 ▲2644.93 ▼0.01115.14 ▲2.4943.82 ▲4.09
Posts /wp-admin/edit.php2,345 ▲2532.23 ▲0.1839.15 ▼1.6834.47 ▼2.42
Add New Post /wp-admin/post-new.php1,761 ▲24223.16 ▲0.05657.49 ▲37.8061.84 ▲2.20
Media Library /wp-admin/upload.php1,634 ▲2464.33 ▲0.18115.04 ▲14.3747.94 ▲3.53
BWS Panel /wp-admin/pinterest.php?page=pntrst-bws-panel260.440.0914.48
Settings /wp-admin/pinterest.php260.440.107.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/bws-pinterest/includes/class-pntrst-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bws-pinterest/bws_menu/product_list.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bws-pinterest/bws_menu/class-bws-settings.php:1452
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bws-pinterest/bws-pinterest.php:431

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/pinterest.php?page=pntrst-bws-panel
    • > Network (severe)
    wp-admin/pinterest.php?page=pntrst-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/pinterest.php
    • > Network (severe)
    wp-admin/pinterest.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Pinterest Save and Follow buttons before the post.), #2 (Pinterest Pin widget displaying.), #3 (Pinterest Board widget displaying.), #4 (Pinterest Profile widget displaying.), #5 (Pinterest Settings page.), #6 (Adding Pinterest widgets to the sidebar.), #7 (Adding Pinterest shortcode to your post or page.)
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

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

The main file in "BestWebSoft’s Pinterest" v. 1.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
115 characters long description:
Add Pinterest Follow, Save buttons and profile widgets (Pin, Board, Profile) to WordPress posts, pages and widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected19,824 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PO File113,6555,2888,184
CSS101892805,558
PHP95017005,291
JavaScript938131641
SVG400150

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity80.25
▷ Minimum class complexity21.00
▷ Maximum class complexity210.00
Average method complexity11.23
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2580.65%
▷ Protected methods00.00%
▷ Private methods619.35%
Functions72
▷ Named functions72100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
68 PNG files occupy 5.49MB with 2.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
bws_menu/icons/plugins/bike-rental.png6.86KB2.68KB▼ 60.89%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
bws_menu/icons/themes/unity.png412.66KB167.67KB▼ 59.37%
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.32KB0.18KB▼ 44.00%