78% oktium-face2-widget

Code Review | Oktium Face2

WordPress plugin Oktium Face2 scored 78% from 54 tests.

About plugin

  • Plugin page: oktium-face2-widget
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Jan 12, 2022
  • Latest release: May 11, 2022
  • Number of updates: 13
  • Update frequency: every 9.2 days
  • Top authors: oktium (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼5.45ms] Passed 4 tests

This is a short check of server-side resources used by Oktium Face2
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.97 ▲0.44
Dashboard /wp-admin3.45 ▲0.1442.63 ▼2.75
Posts /wp-admin/edit.php3.56 ▲0.2046.84 ▼4.70
Add New Post /wp-admin/post-new.php6.10 ▲0.2286.74 ▼14.79
Media Library /wp-admin/upload.php3.37 ▲0.1437.87 ▲3.64
Dashboard /wp-admin/plugins.php?page=meta-box3.4032.97
Add New /wp-admin/post-new.php?post_type=face2buttons3.4760.42
All Button /wp-admin/edit.php?post_type=face2buttons3.4136.63
Oktium Face2 /wp-admin/options-general.php?page=face23.3635.98

Server storage [IO: ▲0.94MB] [DB: ▲0.05MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 388 new files
Database: no new tables, 7 new options
New WordPress options
face2_option_face2Key
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Oktium Face2
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12413.19 ▼1.174.44 ▲2.6641.88 ▼9.24
Dashboard /wp-admin2,262 ▲744.85 ▲0.02110.10 ▼4.3440.37 ▼3.43
Posts /wp-admin/edit.php2,122 ▲302.02 ▼0.0340.16 ▼1.5036.31 ▼2.96
Add New Post /wp-admin/post-new.php1,561 ▲3323.32 ▲5.06585.81 ▼11.3849.42 ▲1.53
Media Library /wp-admin/upload.php1,424 ▲334.22 ▼0.0897.51 ▼2.1043.03 ▼1.37
Dashboard /wp-admin/plugins.php?page=meta-box1,7589.00277.6773.27
Add New /wp-admin/post-new.php?post_type=face2buttons1,8912.9771.9140.11
All Button /wp-admin/edit.php?post_type=face2buttons1,1002.0134.5628.55
Oktium Face2 /wp-admin/options-general.php?page=face28152.0625.1526.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • face2_option_face2Key
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/oktium-face2-widget/vendor/wpmetabox/meta-box/inc/templates/audio.php
    • > /wp-content/plugins/oktium-face2-widget/vendor/wpmetabox/meta-box/inc/templates/media.php
    • > /wp-content/plugins/oktium-face2-widget/vendor/wpmetabox/meta-box/inc/templates/video.php
    • > /wp-content/plugins/oktium-face2-widget/vendor/wpmetabox/meta-box/inc/templates/image-advanced.php
    • > /wp-content/plugins/oktium-face2-widget/vendor/wpmetabox/meta-box/inc/templates/upload.php
  • 159× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Choice_Field' not found in wp-content/plugins/oktium-face2-widget/vendor/wpmetabox/meta-box/inc/fields/select.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/oktium-face2-widget/vendor/wpmetabox/meta-box/inc/walkers/base.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/oktium-face2-widget/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/oktium-face2-widget/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/oktium-face2-widget/vendor/composer/installers/src/Composer/Installers/GravInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/oktium-face2-widget/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/oktium-face2-widget/vendor/wpmetabox/meta-box/inc/fields/button.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/oktium-face2-widget/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/oktium-face2-widget/vendor/wpmetabox/meta-box/inc/about/sections/products.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/oktium-face2-widget/vendor/wpmetabox/meta-box/inc/fields/heading.php:11

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: widget, product, video, oktium button, call...

oktium-face2-widget/face2-widget.php 85% from 13 tests

The main PHP file in "Oktium Face2" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("oktium-face2-widget.php" instead of "face2-widget.php")

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
Success! There were no dangerous files found in this plugin13,739 lines of code in 363 files:
LanguageFilesBlank linesComment linesLines of code
PHP2161,8235,4258,586
CSS411521292,443
JavaScript1005525282,307
JSON200287
YAML3300111
SVG1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.15
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes187
▷ Abstract classes73.74%
▷ Concrete classes18096.26%
▷ Final classes00.00%
Methods586
▷ Static methods30351.71%
▷ Public methods48883.28%
▷ Protected methods6410.92%
▷ Private methods345.80%
Functions34
▷ Named functions2676.47%
▷ Anonymous functions823.53%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/wpmetabox/meta-box/img/jqueryui/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
vendor/wpmetabox/meta-box/img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
vendor/wpmetabox/meta-box/img/jqueryui/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
vendor/wpmetabox/meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
vendor/wpmetabox/meta-box/img/jqueryui/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%