10% enstract-seo

Code Review | Enstract SEO

WordPress plugin Enstract SEO scored10%from 54 tests.

About plugin

  • Plugin page: enstract-seo
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Nov 18, 2021
  • Latest release: Dec 1, 2021
  • Number of updates: 11
  • Update frequency: every 8.2 days
  • Top authors: bluearray (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /310 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/enstract-seo/enstract-seo.php+33
    Constant ENSTRACT_PLUGIN_PATH already defined

Server metrics [RAM: ▼1.18MB] [CPU: ▼49.57ms] Passed 4 tests

Analyzing server-side resources used by Enstract SEO
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.659.83 ▼32.33
Dashboard /wp-admin2.84 ▼0.5111.10 ▼48.01
Posts /wp-admin/edit.php2.84 ▼0.5213.04 ▼35.67
Add New Post /wp-admin/post-new.php2.84 ▼3.0514.20 ▼82.28
Media Library /wp-admin/upload.php2.84 ▼0.3912.49 ▼20.88

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 424 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Enstract SEO
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11013.22 ▼1.531.57 ▼0.5840.78 ▼6.70
Dashboard /wp-admin2,248 ▲575.86 ▲0.79105.56 ▼1.2359.86 ▲14.74
Posts /wp-admin/edit.php2,167 ▲782.06 ▲0.0136.74 ▼4.9333.33 ▼7.69
Add New Post /wp-admin/post-new.php1,712 ▲19322.27 ▼0.78632.01 ▼52.6759.46 ▲10.12
Media Library /wp-admin/upload.php1,427 ▲394.12 ▼0.0897.49 ▼3.0773.02 ▲27.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/enstract-seo/enstract-seo.php+33
    Constant ENSTRACT_PLUGIN_PATH already defined
  • The plugin did not uninstall successfully, leaving 424 files (19.47MB) in the plugin directory
    • (new file) app/Controllers/Enstract/Entities/EntitiesCore.php
    • (new file) app/Controllers/Core/Menu/EnstractMenu.php
    • (new file) app/Controllers/Core/Activator/Activator.php
    • (new file) app/Controllers/Core/Deactivator/Deactivator.php
    • (new file) app/Controllers/Enstract/Authentication/AuthRest.php
    • (new file) app/Controllers/Enstract/Enstractor/Enstractor.php
    • (new file) app/Controllers/Core/Enqueue/Enqueue.php
    • (new file) app/Controllers/Core/WordpressRest/WordpressRest.php
    • (new file) README.md
    • (new file) app/Controllers/Enstract/Sidebar/SideBarDisplay.php
    • ...
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/enstract-seo/resources/views/Sidebar/OnBoardingMetaBox.php
    • > /wp-content/plugins/enstract-seo/resources/views/Sidebar/FreeUsePolicy.php
    • > /wp-content/plugins/enstract-seo/resources/views/Sidebar/NewPost.php
    • > /wp-content/plugins/enstract-seo/resources/views/Sidebar/LoggedoutMetaBox.php
  • 161× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/enstract-seo/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\Handler' not found in wp-content/plugins/enstract-seo/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Processor\\MemoryProcessor' not found in wp-content/plugins/enstract-seo/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/enstract-seo/resources/views/Sidebar/MetaBox.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/enstract-seo/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/enstract-seo/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/enstract-seo/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/enstract-seo/vendor/guzzlehttp/psr7/src/ServerRequest.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/enstract-seo/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\\JsonFormatter' not found in wp-content/plugins/enstract-seo/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: google seo, theme, seo, php file, themes...

enstract-seo/enstract-seo.php 85% from 13 tests

The main PHP script in "Enstract SEO" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 290 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.8" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected121,471 lines of code in 372 files:
LanguageFilesBlank linesComment linesLines of code
SVG120352,765
JavaScript124,4386,44332,001
PHP2734,42611,38019,193
JSON20408,076
Markdown241,39404,361
Vuejs Component17263332,456
CSS84961422,282
XSLT22320209
XML200103
YAML14016
make1409

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.69
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces29
Interfaces33
Traits8
Classes211
▷ Abstract classes115.21%
▷ Concrete classes20094.79%
▷ Final classes126.00%
Methods1,556
▷ Static methods1519.70%
▷ Public methods1,18576.16%
▷ Protected methods17611.31%
▷ Private methods19512.53%
Functions175
▷ Named functions5632.00%
▷ Anonymous functions11968.00%
Constants117
▷ Global constants32.56%
▷ Class constants11497.44%
▷ Public constants9482.46%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.38MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png23.54KB9.70KB▼ 58.80%
assets/banner-772x250-rtl.png23.54KB9.70KB▼ 58.80%
assets/img/Step-1.png129.24KB52.95KB▼ 59.03%
assets/screenshot-2.png36.90KB15.40KB▼ 58.27%
assets/screenshot-1.png116.74KB45.16KB▼ 61.31%