10% xenial

Code Review | Xenial

WordPress plugin Xenial scored 10% from 54 tests.

About plugin

  • Plugin page: xenial
  • Plugin version: 1.1.10
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.0
  • WordPress version: 6.3.1
  • First release: Jan 17, 2018
  • Latest release: May 30, 2019
  • Number of updates: 296
  • Update frequency: every 1.7 days
  • Top authors: jtrimm007 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,261 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/xenial/xenial-WP.php+130
    Undefined property: stdClass::$Types

Server metrics [RAM: ▼0.12MB] [CPU: ▼10.72ms] Passed 4 tests

Analyzing server-side resources used by Xenial
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0339.54 ▼9.01
Dashboard /wp-admin3.33 ▲0.0246.08 ▼4.71
Posts /wp-admin/edit.php3.38 ▼0.4749.91 ▼2.19
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.72 ▼26.98
Media Library /wp-admin/upload.php3.25 ▲0.0236.08 ▼0.79

Server storage [IO: ▲0.66MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • The plugin illegally modified 1 file (0.37KB) outside of "wp-content/plugins/xenial/" and "wp-content/uploads/"
    • (new file) sitemap.xml
Filesystem: 32 new files
Database: 1 new table, 7 new options
New tables
wp_schemaLocalBusiness
New WordPress options
xenial_database_version
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Xenial: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.29 ▼0.881.73 ▼0.0247.61 ▲8.69
Dashboard /wp-admin2,242 ▲505.82 ▲0.86104.77 ▼4.7537.45 ▼3.41
Posts /wp-admin/edit.php2,125 ▲392.06 ▲0.0839.50 ▲4.7834.59 ▼1.90
Add New Post /wp-admin/post-new.php1,547 ▲1923.15 ▼0.24643.67 ▼33.5259.06 ▲4.36
Media Library /wp-admin/upload.php1,427 ▲394.21 ▼0.06100.10 ▼2.5243.87 ▼2.81
Xenial /wp-admin/xenial-information.php260.440.0813.27
Robots.txt /wp-admin/xwp-custom-robots.php260.440.076.36
Page Schema /wp-admin/schema.php260.440.086.11
Post Schema /wp-admin/xwp-post-schema.php260.440.106.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_schemaLocalBusiness
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • xenial_database_version
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/xenial/schema.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/xenial/xwp-custom-robots.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/xenial/xenial-information.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/xenial/xwp-post-schema.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/xenial-information.php
    • > Network (severe)
    wp-admin/xenial-information.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/xwp-custom-robots.php
    • > Network (severe)
    wp-admin/xwp-custom-robots.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/schema.php
    • > Network (severe)
    wp-admin/schema.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/xwp-post-schema.php
    • > Network (severe)
    wp-admin/xwp-post-schema.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: seo, schema, localbusiness schema, schemaorg, google...

xenial/xenial-WP.php 77% from 13 tests

The principal PHP file in "Xenial" v. 1.1.10 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("xenial.php" instead of "xenial-WP.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,669 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP106566831,280
XML600263
JavaScript5241486
CSS111640

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.57MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Menu.PNG13.99KB6.72KB▼ 51.94%
assets/activation.PNG5.30KB3.73KB▼ 29.70%
assets/first-half.PNG32.45KB17.08KB▼ 47.36%
assets/webStie.PNG79.03KB32.77KB▼ 58.54%
assets/crawl-bots.PNG173.47KB71.66KB▼ 58.69%