10% wp-address-schema

Code Review | WP Address Schema

WordPress plugin WP Address Schema scored10%from 54 tests.

About plugin

  • Plugin page: wp-address-schema
  • Plugin version: 0.1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: May 9, 2014
  • Latest release: May 9, 2014
  • Number of updates: 7
  • Update frequency: every 0.7 days
  • Top authors: foyster (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /2,594 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-address-schema/wp-address-schema.php+56
    Function create_function() is deprecated

Server metrics [RAM: ▼1.87MB] [CPU: ▼55.33ms] Passed 4 tests

Server-side resources used by WP Address Schema
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.345.34 ▼34.12
Dashboard /wp-admin2.15 ▼1.206.35 ▼53.76
Posts /wp-admin/edit.php2.15 ▼1.217.56 ▼39.67
Add New Post /wp-admin/post-new.php2.15 ▼3.747.01 ▼93.77
Media Library /wp-admin/upload.php2.15 ▼1.086.37 ▼26.55
All Addresses /wp-admin/edit.php?post_type=wp_address_schema2.156.19
Add Address /wp-admin/post-new.php?post_type=wp_address_schema2.156.79

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_wp_address_schema_widget
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Address Schema
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7814.47 ▼0.201.71 ▲0.0239.83 ▲1.47
Dashboard /wp-admin2,230 ▲414.87 ▼0.09110.77 ▲2.4243.95 ▲3.88
Posts /wp-admin/edit.php2,113 ▲241.99 ▼0.0140.72 ▲7.8135.45 ▲0.20
Add New Post /wp-admin/post-new.php1,553 ▲3423.17 ▲0.58572.89 ▼102.5952.14 ▼1.57
Media Library /wp-admin/upload.php1,412 ▲244.20 ▲0.0095.09 ▼5.1539.95 ▼4.93
All Addresses /wp-admin/edit.php?post_type=wp_address_schema1,0701.9829.9528.02
Add Address /wp-admin/post-new.php?post_type=wp_address_schema2,5212.6250.4140.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-address-schema/wp-address-schema.php+56
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_wp_address_schema_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wp_address_schema
    • > Deprecated in wp-content/plugins/wp-address-schema/wp-address-schema.php+56
    Function create_function() is deprecated
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wp_address_schema
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Wp_Address_Schema_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/post-new.php?post_type=wp_address_schema
    • > Notice in wp-content/plugins/wp-address-schema/inc/wp-address-schema-posttype.php+244
    Undefined index: post_type

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
The following issues need your attention
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Wp_Address_Schema' not found in wp-content/plugins/wp-address-schema/inc/wp-address-schema-display.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-address-schema/inc/metaboxes/wp-address-schema-posttype-openinghours.php:4
    • > PHP Notice
      Trying to get property 'post_type' of non-object in wp-content/plugins/wp-address-schema/inc/metaboxes/wp-address-schema-posttype-submit.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-address-schema/inc/wp-address-schema-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_type_object() in wp-content/plugins/wp-address-schema/inc/metaboxes/wp-address-schema-posttype-submit.php:4
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/wp-address-schema/inc/metaboxes/wp-address-schema-posttype-submit.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-address-schema/wp-address-schema.php:109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-address-schema/inc/metaboxes/wp-address-schema-posttype-address.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Address_Schema' not found in wp-content/plugins/wp-address-schema/inc/wp-address-schema-posttype.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-address-schema/inc/metaboxes/wp-address-schema-posttype-html-options.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wp_address_schema
    • > Network (severe)
    js/admin.js?ver=6.3.1 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wp_address_schema
    • > Network (severe)
    css/admin.css?ver=1.0.0 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-address-schema === )
The official readme.txt might help

wp-address-schema/wp-address-schema.php Passed 13 tests

The main file in "WP Address Schema" v. 0.1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
136 characters long description:
A simple plugin for displaying correctly formatted address information, as per the standards set out by http://schema.org/LocalBusiness.

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 detected983 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9117320930
JavaScript19341
CSS12112

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.98
Average class complexity34.25
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods3186.11%
▷ Protected methods00.00%
▷ Private methods513.89%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin