68% wp-incafu

Code Review | WP Incafu

WordPress plugin WP Incafu scored68%from 54 tests.

About plugin

  • Plugin page: wp-incafu
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 16, 2015
  • Latest release: Jul 16, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: tazorax (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /494 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼1.92MB] [CPU: ▼53.48ms] Passed 4 tests

Analyzing server-side resources used by WP Incafu
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.405.35 ▼31.61
Dashboard /wp-admin2.09 ▼1.226.59 ▼43.99
Posts /wp-admin/edit.php2.09 ▼1.276.31 ▼40.59
Add New Post /wp-admin/post-new.php2.09 ▼3.805.46 ▼97.73
Media Library /wp-admin/upload.php2.09 ▼1.146.31 ▼28.72
WP-Incafu /wp-admin/options-general.php?page=wp-incafu_options2.095.92

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Incafu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.23 ▼0.381.66 ▲0.1648.23 ▲10.57
Dashboard /wp-admin2,201 ▲325.54 ▼0.1983.65 ▼19.5239.08 ▼3.75
Posts /wp-admin/edit.php2,106 ▲91.97 ▲0.0133.75 ▼2.7332.03 ▼2.77
Add New Post /wp-admin/post-new.php1,531 ▲523.07 ▼0.00681.89 ▼11.0070.39 ▲11.04
Media Library /wp-admin/upload.php1,406 ▲64.19 ▼0.0393.92 ▼14.1742.59 ▼5.10
WP-Incafu /wp-admin/options-general.php?page=wp-incafu_options8871.9922.7625.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-incafu-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wp-incafu_options
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-incafu-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=wp-incafu_options
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-incafu-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=wp-incafu_options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wp-incafu_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-incafu/wp-incafu.php:126
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/wp-incafu/views/options.php:3

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 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
1 plugin tags: incafu

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

The principal PHP file in "WP Incafu" v. 1.0 is loaded by WordPress automatically on each request
17 characters long description:
Incafu web module

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
Good job! No executable or dangerous file extensions detected367 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS16116227
PHP23638129
Markdown14011

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.25
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
5 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/img/glyphicons_208_cart_out.png0.41KB0.32KB▼ 22.30%
assets/css/img/glyphicons_202_shopping_cart.png0.34KB0.27KB▼ 19.48%
assets/css/img/white.png0.17KB0.12KB▼ 26.04%
assets/css/img/glyphicons_256_delete.png0.28KB0.25KB▼ 12.41%
assets/css/img/glyphicons_003_user.png0.26KB0.22KB▼ 16.36%