72% wp-aiwis

Code Review | AIWIS

WordPress plugin AIWIS scored72%from 54 tests.

About plugin

  • Plugin page: wp-aiwis
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Jun 23, 2017
  • Latest release: Nov 23, 2017
  • Number of updates: 9
  • Update frequency: every 17.0 days
  • Top authors: dassi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /940 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by AIWIS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0725.82 ▼21.40
Dashboard /wp-admin3.32 ▼0.0255.78 ▼12.59
Posts /wp-admin/edit.php3.37 ▲0.0253.46 ▼0.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.42 ▼16.21
Media Library /wp-admin/upload.php3.25 ▲0.0238.23 ▲3.01
WP Aiwis /wp-admin/options-general.php?page=wp-aiwis3.2435.09

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for AIWIS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7013.19 ▼1.022.53 ▲0.7543.39 ▼1.29
Dashboard /wp-admin2,229 ▲264.85 ▼0.06109.35 ▲5.0138.98 ▼1.08
Posts /wp-admin/edit.php2,108 ▲82.02 ▲0.0234.60 ▼7.3634.66 ▼1.97
Add New Post /wp-admin/post-new.php1,533 ▲723.07 ▲5.54674.55 ▼21.9552.36 ▲7.66
Media Library /wp-admin/upload.php1,405 ▲54.23 ▲0.0698.33 ▼10.4045.37 ▼0.17
WP Aiwis /wp-admin/options-general.php?page=wp-aiwis8072.0523.6625.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp-aiwis
    • > Notice in wp-content/plugins/wp-aiwis/admin/partials/wp-aiwis-admin-display.php+27
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-aiwis/public/partials/wp-aiwis-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-aiwis/admin/partials/wp-aiwis-admin-display.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 43 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-aiwis/wp-aiwis.php 85% from 13 tests

The primary PHP file in "AIWIS" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected230 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12148583214
JavaScript232716
CSS2080

PHP code Passed 2 tests

Analyzing 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.07
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin