89% odude-ecard

Code Review | Ecard - Seasonal Greetings

WordPress plugin Ecard - Seasonal Greetings scored 89% from 54 tests.

About plugin

  • Plugin page: odude-ecard
  • Plugin version: 2.7
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.3.0
  • WordPress version: 5.9.2
  • First release: Oct 9, 2014
  • Latest release: Dec 20, 2019
  • Number of updates: 69
  • Update frequency: every 27.5 days
  • Top authors: odude (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

100+ active / 10,033 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

A check of server-side resources used by Ecard - Seasonal Greetings
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0467.95 ▲17.19
Dashboard /wp-admin3.51 ▲0.1133.91 ▼1.67
Posts /wp-admin/edit.php3.74 ▲0.1038.85 ▼7.74
Add New Post /wp-admin/post-new.php6.98 ▲0.01147.40 ▼1,206.71
Media Library /wp-admin/upload.php3.39 ▲0.1041.69 ▲15.79
ODude Ecard /wp-admin/admin.php?page=odudecard3.3643.77
Ecard Settings /wp-admin/admin.php?page=odude_ecard3.4137.51
Ecard Statistics /wp-admin/admin.php?page=odude_ecard_stat3.3624.57

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: 1 new table, no new options
New tables
wp_odudecard_view

Browser metrics Passed 4 tests

An overview of browser requirements for Ecard - Seasonal Greetings
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,816 ▲6215.80 ▲0.126.20 ▼0.172.11 ▼0.49
Dashboard /wp-admin2,931 ▲736.08 ▼0.13122.45 ▼32.26179.69 ▼49.16
Posts /wp-admin/edit.php2,731 ▲373.23 ▼0.0167.18 ▲2.87147.43 ▲0.34
Add New Post /wp-admin/post-new.php1,686 ▲2516.35 ▼0.13447.84 ▲10.71213.31 ▲27.27
Media Library /wp-admin/upload.php1,733 ▲355.54 ▲0.02175.20 ▲7.21205.90 ▲14.97
ODude Ecard /wp-admin/admin.php?page=odudecard1,1542.4162.76119.21
Ecard Settings /wp-admin/admin.php?page=odude_ecard1,2242.6554.40122.40
Ecard Statistics /wp-admin/admin.php?page=odude_ecard_stat1,0132.3753.46119.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/odude-ecard/layout/media/header.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/odude-ecard/libs/hooks.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/odude-ecard/layout/media/compose.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/odude-ecard/layout/media/basic/basic_pick.php:2
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/odude-ecard/layout/media/header.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/odude-ecard/layout/media/header.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/odude-ecard/layout/media/header.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/odude-ecard/layout/pick.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/odude-ecard/layout/media/submit.php:4
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/odude-ecard/layout/media/header.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=odude_ecard
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: $(...).tabs is not a function" "TypeError: $(...).tabs is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=odude_ecard:147:15)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/admin.php?page=odude_ecard
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: $(...).tabs is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: greetings, cards, e-card, ecard, christmas

odude-ecard/odude-ecard.php Passed 13 tests

"Ecard - Seasonal Greetings" version 2.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
ODude Ecard to make a complete greetings card site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,061 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13321701,007
CSS16053
HTML1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
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 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%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin