73% add-pinterest-conversion-tags

Code Review | Add Pinterest conversion tags for Pinterest Ads + Site verification

WordPress plugin Add Pinterest conversion tags for Pinterest Ads + Site verification scored 73% from 54 tests.

About plugin

  • Plugin page: add-pinterest-con...
  • Plugin version: 1.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.9
  • WordPress version: 5.9.2
  • First release: Feb 10, 2019
  • Latest release: Mar 3, 2022
  • Number of updates: 37
  • Update frequency: every 30.2 days
  • Top authors: pagup (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 8,523 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.43MB] [CPU: ▼290.27ms] Passed 4 tests

Server-side resources used by Add Pinterest conversion tags for Pinterest Ads + Site verification
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.3958.56 ▲11.65
Dashboard /wp-admin3.92 ▲0.5136.80 ▲3.81
Posts /wp-admin/edit.php4.15 ▲0.5138.79 ▲2.19
Add New Post /wp-admin/post-new.php7.39 ▲0.4298.63 ▼1,165.71
Media Library /wp-admin/upload.php3.71 ▲0.4125.28 ▼1.37
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius4.0426.63

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 260 new files
Database: no new tables, 4 new options
New WordPress options
fs_debug_mode
fs_active_plugins
fs_accounts
fs_gdpr

Browser metrics Passed 4 tests

A check of browser resources used by Add Pinterest conversion tags for Pinterest Ads + Site verification
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,823 ▲7915.62 ▼0.425.54 ▼0.842.26 ▲0.10
Dashboard /wp-admin2,948 ▲876.06 ▼0.10121.88 ▼19.21159.33 ▼3.34
Posts /wp-admin/edit.php2,747 ▲563.25 ▼0.1064.64 ▲2.16152.01 ▲10.79
Add New Post /wp-admin/post-new.php1,696 ▲619.12 ▲0.85389.57 ▼12.97158.51 ▲4.02
Media Library /wp-admin/upload.php1,758 ▲605.67 ▲0.17139.19 ▼5.16191.02 ▼0.55
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,4782.5155.48119.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/add-pinterest-conversion-tags/vendor/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 4 options in the database
    • fs_active_plugins
    • fs_gdpr
    • fs_debug_mode
    • fs_accounts

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
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
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/add-pinterest-conversion-tags/admin/views/inc/top.view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/add-pinterest-conversion-tags/admin/views/notices/support.view.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Pagup\\Pctag\\Core\\Plugin' not found in wp-content/plugins/add-pinterest-conversion-tags/admin/views/faq.view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/add-pinterest-conversion-tags/admin/views/inc/side.view.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/add-pinterest-conversion-tags/admin/views/metabox.view.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Pagup\\Pctag\\Controllers\\add_action() in wp-content/plugins/add-pinterest-conversion-tags/admin/controllers/TrackingController.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Pagup\\Pctag\\Core\\Plugin' not found in wp-content/plugins/add-pinterest-conversion-tags/admin/views/settings.view.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/add-pinterest-conversion-tags/admin/views/recommendations.view.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Pagup\\Pctag\\Controllers\\SettingsController' not found in wp-content/plugins/add-pinterest-conversion-tags/admin/Settings.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: The official readme.txt might help

add-pinterest-conversion-tags/pinterest-conversion-tag.php 85% from 13 tests

"Add Pinterest conversion tags for Pinterest Ads + Site verification" version 1.2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 163 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("add-pinterest-conversion-tags.php" instead of "pinterest-conversion-tag.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected51,597 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
PHP1327,60416,32531,874
PO File137,5319,16116,474
Sass28399772,515
CSS129021489
JavaScript54362237
JSON1008

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity70.54
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods1,195
▷ Static methods19516.32%
▷ Public methods85071.13%
▷ Protected methods191.59%
▷ Private methods32627.28%
Functions100
▷ Named functions9898.00%
▷ Anonymous functions22.00%
Constants125
▷ Global constants10080.00%
▷ Class constants2520.00%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
14 PNG files occupy 0.35MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/imgs/6.png27.18KB11.65KB▼ 57.15%
vendor/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
admin/assets/imgs/meta-box.png165.87KB49.10KB▼ 70.40%
admin/assets/imgs/p12.png16.41KB7.67KB▼ 53.24%
admin/assets/imgs/p01.png7.72KB4.95KB▼ 35.87%