83% automatic-schema

Code Review | Automatic Schema

WordPress plugin Automatic Schema scored83%from 54 tests.

About plugin

  • Plugin page: automatic-schema
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: Dec 14, 2016
  • Latest release: Nov 9, 2017
  • Number of updates: 9
  • Update frequency: every 36.3 days
  • Top authors: digitalstartup (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /5,749 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Automatic Schema
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.43 ▼4.13
Dashboard /wp-admin3.35 ▲0.0053.29 ▼8.88
Posts /wp-admin/edit.php3.47 ▲0.1153.61 ▲3.39
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.88 ▼12.34
Media Library /wp-admin/upload.php3.26 ▲0.0234.08 ▼4.96
Automatic Schema /wp-admin/options-general.php?page=ds-schema-plugin-settings3.2537.42

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Automatic Schema: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲14414.45 ▲0.011.66 ▼0.3441.92 ▲2.20
Dashboard /wp-admin2,339 ▲1626.21 ▲0.61110.37 ▲14.7140.90 ▲0.75
Posts /wp-admin/edit.php2,267 ▲1673.29 ▲1.2855.79 ▲15.7137.14 ▼0.19
Add New Post /wp-admin/post-new.php1,548 ▲323.03 ▼0.15597.45 ▼46.7935.22 ▼24.56
Media Library /wp-admin/upload.php1,398 ▲14.25 ▲0.0284.33 ▼14.6742.61 ▲0.51
Automatic Schema /wp-admin/options-general.php?page=ds-schema-plugin-settings1,3523.1441.8863.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/automatic-schema/ds-schema.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === automatic-schema === )
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

automatic-schema/ds-schema.php 85% from 13 tests

The main PHP script in "Automatic Schema" version 1.0.8 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("automatic-schema.php" instead of "ds-schema.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin270 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14312215
Markdown134055

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/digitalstartup-logo.png3.33KB1.43KB▼ 57.22%