10% asimov

Code Review | Asimov

WordPress plugin Asimov scored10%from 54 tests.

About plugin

  • Plugin page: asimov
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2021
  • Latest release: Mar 11, 2021
  • Number of updates: 6
  • Update frequency: every 2.3 days
  • Top authors: asc27luigi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /735 total downloads

Benchmarks

Plugin footprint 57% 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
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/asimov/includes/class-asimov-loader.php+152
    Undefined index: timestamp

Server metrics [RAM: ▼0.50MB] [CPU: ▼29.10ms] 75% from 4 tests

An overview of server-side resources used by Asimov
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,337.88ms on /wp-admin/admin.php?page=asimov-plugin-wizard)
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2943.23 ▲2.28
Dashboard /wp-admin3.40 ▲0.1030.74 ▼26.99
Posts /wp-admin/edit.php3.48 ▲0.1238.00 ▼11.66
Add New Post /wp-admin/post-new.php3.47 ▼2.4236.67 ▼76.98
Media Library /wp-admin/upload.php3.43 ▲0.2035.25 ▼0.78
Wizard /wp-admin/admin.php?page=asimov-plugin-wizard3.601,337.88

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 112 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Asimov
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲17213.63 ▼0.628.32 ▲6.6628.38 ▼25.07
Dashboard /wp-admin2,256 ▲535.12 ▲0.23105.65 ▼7.2743.51 ▲0.95
Posts /wp-admin/edit.php2,117 ▲172.51 ▲0.4938.29 ▲0.7240.56 ▲6.16
Add New Post /wp-admin/post-new.php6,285 ▲4,75926.14 ▲8.59828.30 ▲193.3749.13 ▼7.73
Media Library /wp-admin/upload.php1,436 ▲394.34 ▲0.1094.01 ▼24.5354.75 ▲2.02
Wizard /wp-admin/admin.php?page=asimov-plugin-wizard4,04538.351,073.9947.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/asimov/public/partials/asimov-plugin-public-display.php
    • > /wp-content/plugins/asimov/admin/partials/asimov-plugin-admin-display.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/asimov/admin/partials/asimov-plugin-admin-settings-stepper.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/asimov/admin/partials/asimov-plugin-admin-editor-recsys.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/asimov/admin/partials/asimov-plugin-admin-settings-display.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/asimov/includes/vars.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=asimov-plugin-wizard
    • > Other (warning) in unknown
    /wp-admin/admin.php?page=asimov-plugin-wizard 265 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: writing, automation, advice, ai

asimov/asimov-plugin.php 85% from 13 tests

The main PHP script in "Asimov" version 1.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("asimov.php" instead of "asimov-plugin.php")

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
Everything looks great! No dangerous files found in this plugin25,780 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
SVG40012,217
CSS81,613536,320
PHP172546411,858
Sass1434341,768
LESS1434441,758
PO File2323416997
JavaScript5133108862

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity6.62
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods55
▷ Static methods23.64%
▷ Public methods4989.09%
▷ Protected methods00.00%
▷ Private methods610.91%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
20 PNG files occupy 1.14MB with 0.61MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/asimov_ok@1x.png57.99KB20.47KB▼ 64.71%
admin/images/service_account@2x.png58.71KB28.01KB▼ 52.30%
admin/images/asimov_notok@1x.png61.48KB20.85KB▼ 66.09%
admin/images/logo_nero_asimov@3x.png36.20KB17.55KB▼ 51.51%
admin/images/asimov_video_analytics.png42.26KB27.28KB▼ 35.45%