78% id-arrays

Code Review | ID Arrays

WordPress plugin ID Arrays scored78%from 54 tests.

About plugin

  • Plugin page: id-arrays
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7
  • WordPress version: 6.3.1
  • First release: Jan 27, 2016
  • Latest release: Aug 20, 2016
  • Number of updates: 25
  • Update frequency: every 12.6 days
  • Top authors: harman79 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /3,200 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼5.93ms] Passed 4 tests

An overview of server-side resources used by ID Arrays
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.03 ▼9.83
Dashboard /wp-admin3.57 ▲0.2356.55 ▼8.39
Posts /wp-admin/edit.php3.69 ▲0.3347.87 ▲3.28
Add New Post /wp-admin/post-new.php6.15 ▲0.2783.57 ▼8.80
Media Library /wp-admin/upload.php3.50 ▲0.2737.01 ▲4.34
ID Arrays /wp-admin/options-general.php?page=id-arrays3.4834.99

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
ida79_options_val
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

ID Arrays: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.24 ▼1.514.62 ▲2.7939.42 ▼5.15
Dashboard /wp-admin2,213 ▲255.85 ▼0.0399.60 ▼17.4837.92 ▼8.86
Posts /wp-admin/edit.php2,135 ▲462.00 ▼0.0637.16 ▲3.0134.67 ▼1.01
Add New Post /wp-admin/post-new.php1,544 ▲3023.25 ▲5.73661.73 ▼14.4759.50 ▲9.03
Media Library /wp-admin/upload.php1,397 ▲94.19 ▼0.0094.75 ▼3.7240.05 ▼1.62
ID Arrays /wp-admin/options-general.php?page=id-arrays1,0102.0425.3626.37

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: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • ida79_options_val
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/id-arrays/id-arrays-main.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/id-arrays/includes/id-arrays-post-type-list-table.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/id-arrays/id-arrays-options.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/id-arrays/includes/id-arrays-template-list-table.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/id-arrays/includes/id-arrays-tax-list-table.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === id-arrays === )
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

id-arrays/id-arrays-main.php 92% from 13 tests

Analyzing the main PHP file in "ID Arrays" version 2.1.2
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("id-arrays.php" instead of "id-arrays-main.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
Everything looks great! No dangerous files found in this plugin979 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5133123955
JavaScript101924

PHP code Passed 2 tests

Analyzing 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.48
Average class complexity26.25
▷ Minimum class complexity21.00
▷ Maximum class complexity30.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods3485.00%
▷ Protected methods00.00%
▷ Private methods615.00%
Functions14
▷ Named functions14100.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
2 PNG files occupy 0.27MB with 0.14MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/example-2.png35.19KB20.30KB▼ 42.33%
includes/example-1.png241.38KB97.52KB▼ 59.60%