83% structured-data-test-button

Code Review | Structured Data Test Button

WordPress plugin Structured Data Test Button scored83%from 54 tests.

About plugin

  • Plugin page: structured-data-t...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 27, 2017
  • Latest release: Sep 17, 2019
  • Number of updates: 22
  • Update frequency: every 40.3 days
  • Top authors: jasonh1234 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,865 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.72ms] Passed 4 tests

Server-side resources used by Structured Data Test Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.60 ▲0.03
Dashboard /wp-admin3.31 ▼0.0349.80 ▼11.48
Posts /wp-admin/edit.php3.37 ▲0.0146.46 ▼8.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.71 ▼10.53
Media Library /wp-admin/upload.php3.24 ▲0.0037.47 ▲3.01

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Structured Data Test Button
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7714.36 ▲0.201.98 ▲0.4645.40 ▲4.11
Dashboard /wp-admin2,195 ▲185.62 ▲0.0495.51 ▲5.8543.82 ▲2.73
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0434.74 ▼0.4335.74 ▲0.64
Add New Post /wp-admin/post-new.php1,526 ▼222.99 ▲0.03608.35 ▼64.9049.35 ▼1.79
Media Library /wp-admin/upload.php1,403 ▲34.10 ▼0.05101.65 ▼2.3446.58 ▼0.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% 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)
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/structured-data-test-button/structured-data-test-button.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Screenshots: Please a description for screenshot #2 in structured-data-test-button/assets to your readme.txt
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === structured-data-test-button === )
The official readme.txt is a good inspiration

structured-data-test-button/structured-data-test-button.php 92% from 13 tests

Analyzing the main PHP file in "Structured Data Test Button" version 1.1.1
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 192 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 plugin19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.80
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected