84% tejo-makeup-recommender

Code Review | Tejo Makeup Recommender

WordPress plugin Tejo Makeup Recommender scored84%from 54 tests.

About plugin

  • Plugin page: tejo-makeup-recom...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Aug 17, 2022
  • Latest release: Aug 17, 2022
  • Number of updates: 2
  • Update frequency: every 65.5 days
  • Top authors: tejocosmetics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /443 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Tejo Makeup Recommender
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.47 ▲2.84
Dashboard /wp-admin3.32 ▲0.0153.77 ▲1.71
Posts /wp-admin/edit.php3.37 ▲0.0145.75 ▼4.11
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.45 ▼9.61
Media Library /wp-admin/upload.php3.24 ▲0.0139.62 ▲3.90

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_tejo_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Tejo Makeup Recommender
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7013.22 ▼1.181.72 ▼0.2846.14 ▲2.97
Dashboard /wp-admin2,240 ▲405.87 ▲1.0297.33 ▼23.3736.54 ▼8.76
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0237.83 ▼4.5933.86 ▼4.68
Add New Post /wp-admin/post-new.php1,562 ▲3123.10 ▲0.02670.38 ▲35.2566.73 ▲23.37
Media Library /wp-admin/upload.php1,413 ▲134.26 ▲0.02107.32 ▼0.8845.23 ▼0.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_tejo_widget
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tejo-makeup-recommender/tejo_plugin_class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tejo-makeup-recommender/tejo_plugin.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
6 plugin tags: product, makeup, ai, skincare, cosmetics...

tejo-makeup-recommender/tejo_plugin.php 92% from 13 tests

Analyzing the main PHP file in "Tejo Makeup Recommender" version 1.0
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tejo-makeup-recommender.php" instead of "tejo_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected84 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2223684

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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
No PNG images were found in this plugin