67% gs-pinterest-portfolio

Code Review | WordPress Pinterest Plugin - Make a Popup, User Profile, Masonry and Gallery Layout

WordPress plugin WordPress Pinterest Plugin - Make a Popup, User Profile, Masonry and Gallery Layout scored67%from 54 tests.

About plugin

  • Plugin page: gs-pinterest-port...
  • Plugin version: 1.8.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.4
  • WordPress version: 6.3.1
  • First release: Sep 3, 2016
  • Latest release: Nov 28, 2023
  • Number of updates: 80
  • Update frequency: every 33.0 days
  • Top authors: samdani (100%)

Code review

54 tests

User reviews

43 reviews

Install metrics

2,000+ active /107,571 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲1.18MB] [CPU: ▲2.84ms] 75% from 4 tests

Analyzing server-side resources used by WordPress Pinterest Plugin - Make a Popup, User Profile, Masonry and Gallery Layout
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 659.39ms on /wp-admin/admin.php?page=gs-pinterest-plugins-premium)
PageMemory (MB)CPU Time (ms)
Home /4.71 ▲1.2551.97 ▲3.43
Dashboard /wp-admin4.52 ▲1.1852.20 ▼6.87
Posts /wp-admin/edit.php4.58 ▲1.2260.32 ▲9.60
Add New Post /wp-admin/post-new.php7.05 ▲1.16102.54 ▲5.18
Media Library /wp-admin/upload.php4.39 ▲1.1648.51 ▲15.84
GS Pinterest /wp-admin/admin.php?page=gsp-pinterest-main4.3638.03
Help & Usage /wp-admin/admin.php?page=gs-pinterest-plugins-help4.3537.22
GS Plugins Lite /wp-admin/admin.php?page=gs-pinterest-plugins-lite4.72656.62
GS Plugins Pro /wp-admin/admin.php?page=gs-pinterest-plugins-premium4.50659.39

Server storage [IO: ▲1.90MB] [DB: ▲0.04MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 68 new files
Database: 1 new table, 11 new options
New tables
wp_gspin_shortcodes
New WordPress options
widget_recent-comments
widget_gs_pin_board_widget
widget_theysaidso_widget
widget_gs_pin_profile_widget
widget_gs_pinterest_widget
can_compress_scripts
theysaidso_admin_options
widget_gs_follow_pinterest_widget
gspin_plugin_version
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Pinterest Plugin - Make a Popup, User Profile, Masonry and Gallery Layout
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲12914.20 ▼0.161.85 ▼0.1442.46 ▼2.96
Dashboard /wp-admin2,296 ▲1265.51 ▼0.1492.97 ▼8.9476.51 ▲33.84
Posts /wp-admin/edit.php2,201 ▲981.97 ▼0.0440.35 ▲1.8336.60 ▼1.64
Add New Post /wp-admin/post-new.php6,442 ▲4,90624.08 ▲1.21895.03 ▲251.9940.47 ▼13.15
Media Library /wp-admin/upload.php1,498 ▲984.25 ▲0.07125.54 ▲24.7480.36 ▲35.21
GS Pinterest /wp-admin/admin.php?page=gsp-pinterest-main1,1123.6275.3452.05
Help & Usage /wp-admin/admin.php?page=gs-pinterest-plugins-help9942.2924.9062.19
GS Plugins Lite /wp-admin/admin.php?page=gs-pinterest-plugins-lite2,5972.0523.5287.48
GS Plugins Pro /wp-admin/admin.php?page=gs-pinterest-plugins-premium2,2132.0021.7558.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_gspin_shortcodes
  • The uninstall procedure has failed, leaving 11 options in the database
    • db_upgraded
    • widget_gs_pin_board_widget
    • widget_gs_pin_profile_widget
    • gspin_plugin_version
    • widget_recent-comments
    • widget_gs_pinterest_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • ...

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/gs-pinterest-portfolio/templates/gs_pinterest_structure_two_free.php
    • > /wp-content/plugins/gs-pinterest-portfolio/includes/integrations/beaver/includes/frontend.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gs-pinterest-portfolio/includes/gs-common-pages/gs-pinterest-common-pages.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/gs-pinterest-portfolio/includes/shortcode-builder/preview.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gs-pinterest-portfolio/includes/shortcode-builder/page.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function GSPIN\\__() in wp-content/plugins/gs-pinterest-portfolio/templates/gs_pinterest_structure_one.php:23
    • > PHP Warning
      Use of undefined constant GSPIN_PLUGIN_URI - assumed 'GSPIN_PLUGIN_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/gs-pinterest-portfolio/includes/shortcode-builder/page.php on line 9
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/gs-pinterest-portfolio/includes/integrations/beaver/includes/frontend.php on line 3
    • > PHP Notice
      Trying to get property 'shortcode_id' of non-object in wp-content/plugins/gs-pinterest-portfolio/includes/integrations/beaver/includes/frontend.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: pinterest plugin, pinterest plugin wordpress, pinterest, wordpress pinterest, wordpress pinterest plugin

gs-pinterest-portfolio/gs_pinterest_portfolio.php 77% from 13 tests

The main file in "WordPress Pinterest Plugin - Make a Popup, User Profile, Masonry and Gallery Layout" v. 1.8.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gs-pinterest-portfolio.php" instead of "gs_pinterest_portfolio.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 323 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin6,999 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP411,4901,3554,551
CSS9365131,919
Sass11016521
JavaScript6016
SVG2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity15.91
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes34
▷ Abstract classes12.94%
▷ Concrete classes3397.06%
▷ Final classes39.09%
Methods318
▷ Static methods175.35%
▷ Public methods28388.99%
▷ Protected methods195.97%
▷ Private methods165.03%
Functions23
▷ Named functions1565.22%
▷ Anonymous functions834.78%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin