77% wp-ecards-invites

Code Review | WP eCards

WordPress plugin WP eCards scored77%from 54 tests.

About plugin

  • Plugin page: wp-ecards-invites
  • Plugin version: 1.3.904
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Feb 25, 2016
  • Latest release: Aug 18, 2023
  • Number of updates: 89
  • Update frequency: every 30.7 days
  • Top authors: timsayshey (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

300+ active /6,860 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by WP eCards
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0741.40 ▲0.81
Dashboard /wp-admin3.37 ▲0.0246.27 ▼13.83
Posts /wp-admin/edit.php3.49 ▲0.1248.13 ▲2.74
Add New Post /wp-admin/post-new.php5.97 ▲0.0882.01 ▼14.43
Media Library /wp-admin/upload.php3.29 ▲0.0635.74 ▲1.32

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
wp_ecards_api_key
wp_ecards_credit
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP eCards
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲18013.99 ▼0.315.37 ▲3.5443.86 ▼4.35
Dashboard /wp-admin2,221 ▲305.85 ▲0.9696.54 ▼8.9041.03 ▲4.84
Posts /wp-admin/edit.php2,107 ▲152.04 ▲0.0641.13 ▲0.2036.48 ▲5.79
Add New Post /wp-admin/post-new.php1,693 ▲15724.87 ▲1.73603.98 ▼34.0366.64 ▲9.81
Media Library /wp-admin/upload.php1,403 ▲184.21 ▲0.0293.95 ▼2.6641.39 ▼1.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • wp_ecards_api_key
    • widget_theysaidso_widget
    • wp_ecards_credit
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-ecards-invites/public/partials/wp-ecards-public-display.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/wp-ecards-invites/admin/partials/wp-ecards-authenticate.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/wp-ecards-invites/admin/partials/wp-ecards-list.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-ecards-invites/admin/partials/wp-ecards-thanks-button.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #3, #4, #5, #6 in wp-ecards-invites/assets to your readme.txt
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-ecards-invites/wp-ecards.php 85% from 13 tests

"WP eCards" version 1.3.904's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-ecards-invites.php" instead of "wp-ecards.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 157 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin552 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14178603452
JavaScript23057100
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.71
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2575.76%
▷ Protected methods00.00%
▷ Private methods824.24%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin