84% really-rich-results

Code Review | Really Rich Results - JSON-LD Structured Data (Google Rich Results)

WordPress plugin Really Rich Results - JSON-LD Structured Data (Google Rich Results) scored84%from 54 tests.

About plugin

  • Plugin page: really-rich-results
  • Plugin version: 0.1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7
  • WordPress version: 6.3.1
  • First release: Jun 14, 2021
  • Latest release: Jun 14, 2021
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: JeffMatson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /641 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
Install script ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼5.80ms] Passed 4 tests

An overview of server-side resources used by Really Rich Results - JSON-LD Structured Data (Google Rich Results)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5051.60 ▲12.24
Dashboard /wp-admin3.49 ▲0.1448.19 ▼13.35
Posts /wp-admin/edit.php3.60 ▲0.2447.93 ▲1.07
Add New Post /wp-admin/post-new.php6.14 ▲0.2587.76 ▼11.29
Media Library /wp-admin/upload.php3.41 ▲0.1835.19 ▲0.39
R³ Schema /wp-admin/tools.php?page=really_rich_results3.3932.79

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Really Rich Results - JSON-LD Structured Data (Google Rich Results)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.20 ▼1.184.76 ▲3.1041.03 ▲1.96
Dashboard /wp-admin2,213 ▲284.85 ▼0.1997.71 ▼4.4538.75 ▼2.86
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0434.55 ▼8.5131.92 ▼2.39
Add New Post /wp-admin/post-new.php6,208 ▲4,67318.95 ▼4.21887.31 ▲193.4850.96 ▲0.28
Media Library /wp-admin/upload.php1,389 ▲14.19 ▼0.1296.58 ▼13.6942.98 ▼4.51
R³ Schema /wp-admin/tools.php?page=really_rich_results9547.18166.4237.87

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
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following items
  • 33× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Really_Rich_Results\\Schema\\MediaObject' not found in wp-content/plugins/really-rich-results/src/Schema/ImageObject.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Really_Rich_Results\\Data_Sources\\Abstract_Data_Source' not found in wp-content/plugins/really-rich-results/src/Data_Sources/WP_User.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Really_Rich_Results\\Data_Sources\\Abstract_Data_Source' not found in wp-content/plugins/really-rich-results/src/Data_Sources/Site.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Really_Rich_Results\\Schema\\Thing' not found in wp-content/plugins/really-rich-results/src/Schema/CreativeWork.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Really_Rich_Results\\Data_Sources\\Abstract_Data_Source' not found in wp-content/plugins/really-rich-results/src/Data_Sources/WP_Comment.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Really_Rich_Results\\Content_Types\\Abstract_Content_Type' not found in wp-content/plugins/really-rich-results/src/Content_Types/Archive.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Really_Rich_Results\\Content_Types\\Abstract_Content_Type' not found in wp-content/plugins/really-rich-results/src/Content_Types/Single.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Really_Rich_Results\\Content_Types\\Archive' not found in wp-content/plugins/really-rich-results/src/Content_Types/Blog_Index.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Really_Rich_Results\\Schema\\CreativeWork' not found in wp-content/plugins/really-rich-results/src/Schema/Review.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Really_Rich_Results\\Schema\\Thing' not found in wp-content/plugins/really-rich-results/src/Schema/Action.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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: rich results, schemaorg, seo, schema, structured data...

really-rich-results/really-rich-results.php 92% from 13 tests

This is the main PHP file of "Really Rich Results - JSON-LD Structured Data (Google Rich Results)" version 0.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Good job! No executable or dangerous file extensions detected2,821 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP608542,6282,811
JSON1005
JavaScript2002
SVG2002
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.92
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods303
▷ Static methods3310.89%
▷ Public methods22172.94%
▷ Protected methods289.24%
▷ Private methods5417.82%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.51MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png59.53KB60.11KB0.00%
assets/banner-1544x500.png222.06KB94.02KB▼ 57.66%
assets/banner-772x250.png94.27KB33.76KB▼ 64.18%
assets/screenshot-1.png29.57KB29.82KB0.00%
assets/rrr.png13.07KB6.81KB▼ 47.93%