84% article-json-ld

Code Review | Article JSON-LD

WordPress plugin Article JSON-LD scored 84% from 54 tests.

About plugin

  • Plugin page: article-json-ld
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Nov 4, 2016
  • Latest release: Oct 22, 2020
  • Number of updates: 8
  • Update frequency: every 181.0 days
  • Top authors: alex-ye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,324 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.56ms] Passed 4 tests

An overview of server-side resources used by Article JSON-LD
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.30 ▼0.93
Dashboard /wp-admin3.34 ▲0.0447.35 ▲1.20
Posts /wp-admin/edit.php3.39 ▲0.0346.50 ▲2.30
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.65 ▼15.00
Media Library /wp-admin/upload.php3.26 ▲0.0334.77 ▲0.51

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Article JSON-LD
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.191.64 ▼0.1641.92 ▼6.83
Dashboard /wp-admin2,209 ▲175.91 ▲1.0098.23 ▼13.6238.01 ▼5.20
Posts /wp-admin/edit.php2,089 ▲32.16 ▲0.1237.74 ▲2.1035.97 ▼0.75
Add New Post /wp-admin/post-new.php1,547 ▲3318.16 ▲0.59607.79 ▼29.4677.34 ▲12.80
Media Library /wp-admin/upload.php1,382 ▼34.14 ▼0.1199.50 ▼3.1942.23 ▼4.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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)
Even though everything seems fine, this is not 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ArticleJsonLd\\add_action() in wp-content/plugins/article-json-ld/main.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: json-ld, microdata, schemaorg, structured data, rich snippets...

article-json-ld/main.php 92% from 13 tests

"Article JSON-LD" version 0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("article-json-ld.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin147 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23542147

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
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
Namespaces1
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin