78% insim

Code Review | inSIM

WordPress plugin inSIM scored78%from 54 tests.

About plugin

  • Plugin page: insim
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 21, 2022
  • Latest release: May 31, 2023
  • Number of updates: 18
  • Update frequency: every 11.3 days
  • Top authors: 2wstechnologies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /204 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.54ms] Passed 4 tests

Analyzing server-side resources used by inSIM
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.99 ▼2.79
Dashboard /wp-admin3.37 ▲0.0251.20 ▼15.94
Posts /wp-admin/edit.php3.42 ▲0.0655.36 ▲3.99
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.86 ▼12.67
Media Library /wp-admin/upload.php3.29 ▲0.0638.73 ▲1.23

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

inSIM: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.39 ▼0.171.73 ▼0.0445.88 ▲0.81
Dashboard /wp-admin2,192 ▲125.54 ▼0.1390.52 ▼7.3140.54 ▼2.82
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0538.99 ▼2.3335.77 ▼1.13
Add New Post /wp-admin/post-new.php1,526 ▼023.12 ▼0.48688.19 ▼31.9354.93 ▲1.74
Media Library /wp-admin/upload.php1,397 ▼34.23 ▲0.04103.69 ▼2.7646.76 ▲1.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/insim/public/partials/sim-to-shop-public-display.php
  • 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/insim/admin/API_SMS_PHP_SimToShop/config.inc.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/insim/admin/API_SMS_PHP_SimToShop/config.inc.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/insim/admin/API_SMS_PHP_SimToShop/config.inc.php:119
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/insim/includes/sim-to-shop-activator.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/insim/admin/API_SMS_PHP_SimToShop/config.inc.php:119
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/insim/admin/sim-to-shop-campaign-list.php on line 26
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/insim/includes/sim-to-shop-activator.php on line 13
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/insim/admin/sim-to-shop-recipient-list.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/insim/admin/API_SMS_PHP_SimToShop/config.inc.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/insim/admin/API_SMS_PHP_SimToShop/config.inc.php:119

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can look at the official readme.txt

insim/inSIM.php 85% from 13 tests

This is the main PHP file of "inSIM" version 1.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 144 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("insim.php" instead of "inSIM.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin7,549 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP391,1991,6995,790
CSS433571,144
JavaScript28498615

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity28.74
▷ Minimum class complexity1.00
▷ Maximum class complexity138.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes00.00%
Methods241
▷ Static methods5020.75%
▷ Public methods21488.80%
▷ Protected methods52.07%
▷ Private methods229.13%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants85
▷ Global constants8397.65%
▷ Class constants22.35%
▷ Public constants2100.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
6 PNG files occupy 0.12MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/solo_new0.png38.40KB11.88KB▼ 69.06%
admin/img/yes.png0.53KB0.58KB0.00%
admin/img/to_top.png60.17KB19.50KB▼ 67.59%
admin/img/information.png0.76KB0.83KB0.00%
admin/img/no.png0.74KB0.74KB0.00%