84% wp-carticon

Code Review | WP Carticon

WordPress plugin WP Carticon scored84%from 54 tests.

About plugin

  • Plugin page: wp-carticon
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 20, 2020
  • Latest release: Nov 20, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: carticon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /355 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.93ms] Passed 4 tests

Analyzing server-side resources used by WP Carticon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0244.50 ▲1.47
Dashboard /wp-admin3.33 ▼0.0150.83 ▼18.92
Posts /wp-admin/edit.php3.38 ▲0.0351.11 ▲5.59
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.60 ▼15.96
Media Library /wp-admin/upload.php3.25 ▲0.0335.15 ▼2.30
Carticon /wp-admin/options-general.php?page=carticon-settings3.2230.53

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Carticon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.33 ▼0.441.88 ▲0.0643.70 ▲1.45
Dashboard /wp-admin2,198 ▲245.62 ▼0.0190.61 ▼2.8239.50 ▼1.48
Posts /wp-admin/edit.php2,109 ▲92.01 ▲0.0538.76 ▼2.5736.45 ▼1.11
Add New Post /wp-admin/post-new.php6,233 ▲4,70725.98 ▲2.38925.23 ▲224.3865.81 ▲8.62
Media Library /wp-admin/upload.php1,406 ▲34.30 ▲0.0897.12 ▼10.2547.91 ▼1.55
Carticon /wp-admin/options-general.php?page=carticon-settings9011.9924.0530.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • carticon_js_script
    • theysaidso_admin_options
    • db_upgraded
    • carticon_activate_global
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-carticon/wp-carticon.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
5 plugin tags: ecommerce, b2c, sell online, orders, shop

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

The main PHP file in "WP Carticon" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
85 characters long description:
Quickly add Carticon widget on your Wordpress site and start selling online instantly

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin148 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13142142
CSS1006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/carticon.png9.30KB4.32KB▼ 53.58%