93% pinterest-site-verification

Code Review | Pinterest Site Verification plugin using Meta Tag

WordPress plugin Pinterest Site Verification plugin using Meta Tag scored 93% from 54 tests.

About plugin

  • Plugin page: pinterest-site-ve...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.1-4.9.8
  • WordPress version: 5.8.1
  • First release: Mar 14, 2013
  • Latest release: Nov 10, 2018
  • Number of updates: 13
  • Update frequency: every 159.0 days
  • Top authors: uniquecoder@gmail.com (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 10,936 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼140.11ms] Passed 4 tests

Server-side resources used by Pinterest Site Verification plugin using Meta Tag
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0236.99 ▼0.13
Dashboard /wp-admin3.08 ▲0.0346.00 ▲0.39
Posts /wp-admin/edit.php3.14 ▲0.0344.36 ▼2.04
Add New Post /wp-admin/post-new.php5.44 ▲0.0191.79 ▼558.60
Media Library /wp-admin/upload.php3.03 ▲0.0336.40 ▲0.35
Pinterest Site Verification /wp-admin/options-general.php?page=Pinterest-meta-tag-verification3.0030.10

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Pinterest Site Verification plugin using Meta Tag
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,804 ▲23216.22 ▲0.4915.10 ▲5.2246.50 ▲2.36
Dashboard /wp-admin2,980 ▲466.04 ▲0.01153.70 ▼28.09114.16 ▲1.83
Posts /wp-admin/edit.php2,746 ▲72.73 ▲0.0269.75 ▲3.3689.34 ▲1.39
Add New Post /wp-admin/post-new.php1,623 ▲2921.33 ▲2.58282.95 ▼130.46104.09 ▼5.29
Media Library /wp-admin/upload.php1,817 ▼55.05 ▲0.01161.35 ▼6.24109.65 ▼11.25
Pinterest Site Verification /wp-admin/options-general.php?page=Pinterest-meta-tag-verification1,1052.4964.0979.04

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pinterest-site-verification/PinterestMetaTagSiteVerification.php:129

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #4 (Copy the whole code.)
  • Plugin Name: You should set the name of your plugin on the first line ( === pinterest-site-verification === )
You can take inspiration from this readme.txt

pinterest-site-verification/PinterestMetaTagSiteVerification.php 92% from 13 tests

The primary PHP file in "Pinterest Site Verification plugin using Meta Tag" version 1.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pinterest-site-verification.php" instead of "PinterestMetaTagSiteVerification.php")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin139 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15124126
JavaScript10113

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png30.03KB16.46KB▼ 45.19%
screenshot-3.png30.51KB16.26KB▼ 46.72%
screenshot-1.png3.68KB1.76KB▼ 52.26%