94% all-in-one-intranet

Code Review | All-In-One Intranet

WordPress plugin All-In-One Intranet scored 94% from 54 tests.

About plugin

  • Plugin page: all-in-one-intranet
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7.2
  • WordPress version: 5.8.1
  • First release: Jul 3, 2014
  • Latest release: Jul 14, 2021
  • Number of updates: 28
  • Update frequency: every 91.7 days
  • Top authors: danlester (64.29%)levertechadmin (32.14%)chrisakelley (10.71%)

Code review

54 tests

User reviews

9 reviews

Install metrics

6,000+ active / 90,648 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼140.15ms] Passed 4 tests

Analyzing server-side resources used by All-In-One Intranet
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.13 ▲9.85
Dashboard /wp-admin3.09 ▲0.0348.09 ▼5.83
Posts /wp-admin/edit.php3.13 ▲0.0347.89 ▲2.67
Add New Post /wp-admin/post-new.php5.45 ▲0.0292.98 ▼549.06
Media Library /wp-admin/upload.php3.03 ▲0.0230.54 ▼8.36
All-In-One Intranet /wp-admin/options-general.php?page=aioi_list_options3.0033.82

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

All-In-One Intranet: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.24 ▲0.697.36 ▼0.7152.17 ▲3.37
Dashboard /wp-admin2,975 ▲415.86 ▼0.10133.17 ▼21.77103.10 ▼11.54
Posts /wp-admin/edit.php2,744 ▲82.70 ▲0.0262.66 ▼9.1988.14 ▲1.36
Add New Post /wp-admin/post-new.php1,501 ▼17118.81 ▼0.04346.76 ▼24.95104.96 ▼1.82
Media Library /wp-admin/upload.php1,815 ▲55.02 ▼0.00144.15 ▲3.23120.42 ▲2.48
All-In-One Intranet /wp-admin/options-general.php?page=aioi_list_options1,2002.1751.9488.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% 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 50% 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 fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/all-in-one-intranet/basic_all_in_one_intranet.php:16

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: visibility, company, authentication, secure, privacy...

all-in-one-intranet/basic_all_in_one_intranet.php 92% from 13 tests

"All-In-One Intranet" version 1.7.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("all-in-one-intranet.php" instead of "basic_all_in_one_intranet.php")

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 plugin622 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP212938488
PO File1283266
CSS16161
JavaScript1317

PHP code Passed 2 tests

This is a very shot review 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.38
Average class complexity38.00
▷ Minimum class complexity4.00
▷ Maximum class complexity72.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods38
▷ Static methods12.63%
▷ Public methods1539.47%
▷ Protected methods2360.53%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.20MB with 0.13MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/basic_loginupgrade.png48.68KB15.91KB▼ 67.32%
img/basic_aioi.png48.96KB17.04KB▼ 65.20%
img/basic_avatars.png60.82KB17.00KB▼ 72.05%
img/basic_driveplugin.png44.05KB16.22KB▼ 63.17%