84% top-story-schema

Code Review | Top Story Schema

WordPress plugin Top Story Schema scored84%from 54 tests.

About plugin

  • Plugin page: top-story-schema
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 26, 2020
  • Latest release: May 26, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: panutat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /519 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by Top Story Schema
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0144.21 ▲3.66
Dashboard /wp-admin3.32 ▼0.0347.47 ▼13.96
Posts /wp-admin/edit.php3.37 ▲0.0159.32 ▼6.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.19 ▼11.88
Media Library /wp-admin/upload.php3.24 ▲0.0137.63 ▼0.27

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

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

Browser metrics Passed 4 tests

Top Story Schema: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4814.23 ▼0.301.70 ▼0.5340.63 ▼0.81
Dashboard /wp-admin2,195 ▲155.62 ▲0.0496.84 ▲4.0640.48 ▼1.88
Posts /wp-admin/edit.php2,103 ▼02.02 ▲0.0740.75 ▼1.4935.01 ▼0.45
Add New Post /wp-admin/post-new.php1,526 ▼022.93 ▼0.48614.24 ▼28.3250.71 ▼2.45
Media Library /wp-admin/upload.php1,394 ▼64.18 ▼0.04102.13 ▲7.1340.56 ▼4.70

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/top-story-schema/top-story-schema.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: You can look at the official readme.txt

top-story-schema/top-story-schema.php 92% from 13 tests

"Top Story Schema" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111056

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin