10% business-card-by-esterox-100

Code Review | Business Card

WordPress plugin Business Card scored10%from 54 tests.

About plugin

  • Plugin page: business-card-by-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4
  • WordPress version: 6.3.1
  • First release: Oct 19, 2015
  • Latest release: Dec 23, 2015
  • Number of updates: 5
  • Update frequency: every 14.2 days
  • Top authors: Esterox (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /3,251 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.23ms] Passed 4 tests

This is a short check of server-side resources used by Business Card
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0640.01 ▼4.58
Dashboard /wp-admin3.37 ▲0.0349.78 ▼16.49
Posts /wp-admin/edit.php3.43 ▲0.0755.28 ▲7.47
Add New Post /wp-admin/post-new.php5.97 ▲0.0897.00 ▼15.27
Media Library /wp-admin/upload.php3.29 ▲0.0737.82 ▼0.56
All cards /wp-admin/admin.php?page=es-bcard-options3.3537.10
Categories /wp-admin/admin.php?page=es-bcard-category3.2729.40

Server storage [IO: ▲2.65MB] [DB: ▲0.04MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 45 new files
Database: 2 new tables, 6 new options
New tables
wp_es_bcard
wp_es_category
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Business Card
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲22416.56 ▲2.2112.59 ▲10.8839.03 ▼6.21
Dashboard /wp-admin2,233 ▲596.30 ▲0.6997.11 ▲9.4668.55 ▲23.70
Posts /wp-admin/edit.php2,213 ▲1103.25 ▲1.2645.49 ▲5.2738.58 ▲3.60
Add New Post /wp-admin/post-new.php1,713 ▲17724.79 ▲1.82678.16 ▲19.5347.37 ▼4.41
Media Library /wp-admin/upload.php1,504 ▲1045.75 ▲1.53102.46 ▼10.4185.19 ▲33.59
All cards /wp-admin/admin.php?page=es-bcard-options1,0303.0438.0737.80
Categories /wp-admin/admin.php?page=es-bcard-category1,0133.0331.7130.02

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=es-bcard-category
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/admin.php?page=es-bcard-options
    • > Notice in wp-content/plugins/business-card-by-esterox-100/admin_view.php+213
    Undefined variable: html

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/business-card-by-esterox-100/edit_business_card_admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/business-card-by-esterox-100/business_card.php:11
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/business-card-by-esterox-100/admin_view.php:182
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/business-card-by-esterox-100/admin_category_view.php:40
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/business-card-by-esterox-100/admin_category_view.php on line 40
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/business-card-by-esterox-100/admin_view.php on line 182
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/business-card-by-esterox-100/business_card_view.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

business-card-by-esterox-100/business_card.php 92% from 13 tests

"Business Card" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("business-card-by-esterox-100.php" instead of "business_card.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin19,965 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33,3697,58913,836
CSS33721325,111
PHP6151401,018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
22 PNG files occupy 1.08MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png260.69KB50.06KB▼ 80.80%
img/bs_icon.png1.11KB1.30KB0.00%
img/business_1.png68.83KB29.43KB▼ 57.25%
img/bs_icon1.png0.49KB0.67KB0.00%
img/AlignTextLeft.png2.83KB0.15KB▼ 94.66%