67% 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 scored67%from 54 tests.

About plugin

  • Plugin page: add-pinterest-con...
  • Plugin version: 1.2.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Feb 10, 2019
  • Latest release: Aug 24, 2023
  • Number of updates: 44
  • Update frequency: every 37.7 days
  • Top authors: pagup (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /16,237 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.06MB] [CPU: ▲27.99ms] 75% from 4 tests

A check of server-side resources used by Add Pinterest conversion tags for Pinterest Ads + Site verification
It is recommended to improve the following
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.06MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.95 ▲5.4864.13 ▲22.81
Dashboard /wp-admin8.97 ▲5.6674.10 ▲28.80
Posts /wp-admin/edit.php8.97 ▲5.6175.94 ▲28.85
Add New Post /wp-admin/post-new.php9.39 ▲3.50128.50 ▲38.61
Media Library /wp-admin/upload.php8.97 ▲5.7367.06 ▲31.49
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9768.85

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 231 new files
Database: no new tables, 9 new options
New WordPress options
fs_active_plugins
can_compress_scripts
fs_debug_mode
fs_accounts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Pinterest conversion tags for Pinterest Ads + Site verification
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8713.64 ▼0.794.72 ▲2.1531.99 ▼15.44
Dashboard /wp-admin2,250 ▲624.90 ▼0.10111.08 ▼9.9657.93 ▲19.15
Posts /wp-admin/edit.php2,136 ▲442.09 ▲0.0936.86 ▼3.0350.66 ▲14.77
Add New Post /wp-admin/post-new.php1,542 ▲922.98 ▲0.02688.33 ▲5.5552.22 ▼4.39
Media Library /wp-admin/upload.php1,435 ▲504.32 ▼0.00100.11 ▼14.1256.22 ▲5.54
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1071.7626.5243.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/add-pinterest-conversion-tags/vendor/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • fs_debug_mode
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • fs_active_plugins
    • theysaidso_admin_options
    • can_compress_scripts
    • fs_accounts
    • widget_theysaidso_widget

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 50% 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
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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
    • > 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/faq.view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/add-pinterest-conversion-tags/admin/views/metabox.view.php:10
    • > 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/inc/top.view.php:2
    • > 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 wp_kses() in wp-content/plugins/add-pinterest-conversion-tags/admin/views/notices/support.view.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Javascript (severe) in unknown
    /wp-content/plugins/add-pinterest-conversion-tags/admin/assets/app.js?ver=1677444562 33:17 Uncaught ReferenceError: data is not defined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: You can take inspiration from this readme.txt

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

The principal PHP file in "Add Pinterest conversion tags for Pinterest Ads + Site verification" v. 1.2.5 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("add-pinterest-conversion-tags.php" instead of "pinterest-conversion-tag.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 163 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin35,529 lines of code in 165 files:
LanguageFilesBlank linesComment linesLines of code
PHP1438,35917,45934,707
CSS148921525
JavaScript74567289
JSON1008

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity73.95
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes62
▷ Abstract classes23.23%
▷ Concrete classes6096.77%
▷ Final classes00.00%
Methods1,325
▷ Static methods21916.53%
▷ Public methods93070.19%
▷ Protected methods221.66%
▷ Private methods37328.15%
Functions105
▷ Named functions10398.10%
▷ Anonymous functions21.90%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.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.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/imgs/p12.png16.41KB7.67KB▼ 53.24%
admin/assets/imgs/p04.png29.72KB14.09KB▼ 52.59%
vendor/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
admin/assets/imgs/p02.png2.50KB0.65KB▼ 74.01%
admin/assets/imgs/p10.png8.64KB4.61KB▼ 46.68%