84% wp-inci

Code Review | WP INCI

WordPress plugin WP INCI scored84%from 54 tests.

About plugin

  • Plugin page: wp-inci
  • Plugin version: 1.6.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Jul 29, 2020
  • Latest release: Nov 10, 2023
  • Number of updates: 76
  • Update frequency: every 15.8 days
  • Top authors: xlthlx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,350 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.43MB] [CPU: ▼3.56ms] Passed 4 tests

An overview of server-side resources used by WP INCI
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2540.92 ▲0.80
Dashboard /wp-admin3.81 ▲0.4648.90 ▼14.75
Posts /wp-admin/edit.php3.88 ▲0.5348.48 ▲0.93
Add New Post /wp-admin/post-new.php6.63 ▲0.7490.39 ▼1.20
Media Library /wp-admin/upload.php3.69 ▲0.4635.28 ▲3.69
Add New /wp-admin/post-new.php?post_type=product6.7488.21
Sources /wp-admin/edit-tags.php?taxonomy=source&post_type=ingredient3.7138.60
All Products /wp-admin/edit.php?post_type=product3.7938.56
WP INCI /wp-admin/options-general.php?page=wi_settings3.7232.61
Add New /wp-admin/post-new.php?post_type=ingredient6.6984.78
All Ingredients /wp-admin/edit.php?post_type=ingredient3.7537.41
Brands /wp-admin/edit-tags.php?taxonomy=brand&post_type=product3.6934.72
Functions /wp-admin/edit-tags.php?taxonomy=functions&post_type=ingredient3.6932.76

Server storage [IO: ▲3.95MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by WP INCI
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲13714.35 ▲0.001.74 ▼0.2443.94 ▼0.13
Dashboard /wp-admin2,300 ▲1235.80 ▲0.1494.70 ▼11.3138.95 ▼3.53
Posts /wp-admin/edit.php2,206 ▲1092.30 ▲0.3338.60 ▲3.5333.91 ▼0.23
Add New Post /wp-admin/post-new.php1,604 ▲7523.53 ▲0.43616.67 ▼50.1555.65 ▲7.04
Media Library /wp-admin/upload.php1,493 ▲904.29 ▲0.08103.39 ▲6.5342.24 ▲0.77
Add New /wp-admin/post-new.php?post_type=product1,76016.94939.2442.42
Sources /wp-admin/edit-tags.php?taxonomy=source&post_type=ingredient1,4142.0832.9328.27
All Products /wp-admin/edit.php?post_type=product1,2712.2735.4828.32
WP INCI /wp-admin/options-general.php?page=wi_settings1,4395.5291.3442.29
Add New /wp-admin/post-new.php?post_type=ingredient1,69216.83738.1834.88
All Ingredients /wp-admin/edit.php?post_type=ingredient1,2892.2834.9230.16
Brands /wp-admin/edit-tags.php?taxonomy=brand&post_type=product1,3512.0031.4030.34
Functions /wp-admin/edit-tags.php?taxonomy=functions&post_type=ingredient1,3572.0531.0629.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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)
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 203× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-inci/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/wp-inci/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-inci/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-inci/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Args\\Shared\\Base' not found in wp-content/plugins/wp-inci/vendor/johnbillion/args/src/register_rest_field.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Args\\Arrayable\\Arrayable' not found in wp-content/plugins/wp-inci/vendor/johnbillion/args/src/Shared/Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-inci/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Args\\WP_Http' not found in wp-content/plugins/wp-inci/vendor/johnbillion/args/src/wp_remote_request.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-inci/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/wp-inci/vendor/cmb2/cmb2/includes/types/CMB2_Type_File_List.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
4 plugin tags: makeup, cosmetics, inci, ingredients

wp-inci/wp-inci.php Passed 13 tests

The main file in "WP INCI" v. 1.6.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
87 characters long description:
A WordPress plugin to manage INCI (International Nomenclature of Cosmetic Ingredients).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin67,362 lines of code in 440 files:
LanguageFilesBlank linesComment linesLines of code
PO File12114,71619,25932,846
PHP2514,39412,83014,806
JSON10007,774
CSS163451,2014,999
JavaScript155576392,408
XML239731,928
Sass17306291,411
Markdown537501,079
YAML3300111

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity8.89
▷ Minimum class complexity1.00
▷ Maximum class complexity209.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces12
Interfaces7
Traits5
Classes240
▷ Abstract classes125.00%
▷ Concrete classes22895.00%
▷ Final classes62.63%
Methods858
▷ Static methods12514.57%
▷ Public methods71383.10%
▷ Protected methods13315.50%
▷ Private methods121.40%
Functions44
▷ Named functions3784.09%
▷ Anonymous functions715.91%
Constants139
▷ Global constants53.60%
▷ Class constants13496.40%
▷ Public constants134100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
vendor/cmb2/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%