84% otisai

Code Review | Otis - Your digital marketing assistant

WordPress plugin Otis - Your digital marketing assistant scored84%from 54 tests.

About plugin

  • Plugin page: otisai
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Nov 27, 2021
  • Latest release: Dec 28, 2021
  • Number of updates: 4
  • Update frequency: every 8.0 days
  • Top authors: otiswp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /343 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.20ms] Passed 4 tests

A check of server-side resources used by Otis - Your digital marketing assistant
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.52 ▼2.18
Dashboard /wp-admin3.31 ▼0.0444.69 ▼14.58
Posts /wp-admin/edit.php3.36 ▲0.0044.59 ▼2.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.47 ▼9.12
Media Library /wp-admin/upload.php3.23 ▲0.0040.07 ▲6.49

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Otis - Your digital marketing assistant
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.071.78 ▲0.2840.84 ▲0.05
Dashboard /wp-admin2,198 ▲175.58 ▼0.0783.75 ▼16.1641.86 ▲1.05
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0033.53 ▼2.0836.17 ▲0.21
Add New Post /wp-admin/post-new.php1,528 ▲222.99 ▼0.06642.21 ▲25.5856.21 ▼14.97
Media Library /wp-admin/upload.php1,403 ▲64.21 ▼0.05109.75 ▲4.2847.04 ▼2.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'OtisAI\\options\\OtisAIOptions' not found in wp-content/plugins/otisai/src/options/class-accountoptions.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'OtisAI\\wp\\Options' not found in wp-content/plugins/otisai/src/options/class-otisaioptions.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 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
3 plugin tags: campaigns, digital marketing, analytics

otisai/otisai.php Passed 13 tests

This is the main PHP file of "Otis - Your digital marketing assistant" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
86 characters long description:
Launch data-driven digital ad campaigns on Facebook, Instagram and Google in 5 minutes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin44,758 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP2940,40926,92342,371
JSON2102,290
CSS211083
XML14314

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.73
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods117
▷ Static methods7967.52%
▷ Public methods10287.18%
▷ Protected methods10.85%
▷ Private methods1411.97%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants21
▷ Global constants733.33%
▷ Class constants1466.67%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.36MB with 0.14MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/otis-icon.png371.62KB231.19KB▼ 37.79%