78% getsmily

Code Review | Emolytics

WordPress plugin Emolytics scored 78% from 54 tests.

About plugin

  • Plugin page: getsmily
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6.1
  • WordPress version: 5.8.1
  • First release: Dec 3, 2014
  • Latest release: Jul 13, 2018
  • Number of updates: 13
  • Update frequency: every 101.8 days
  • Top authors: getsmily (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 1,534 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.85MB] [CPU: ▼193.17ms] Passed 4 tests

Analyzing server-side resources used by Emolytics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.78 ▼1.068.71 ▼27.15
Dashboard /wp-admin1.80 ▼1.265.40 ▼41.53
Posts /wp-admin/edit.php1.80 ▼1.315.57 ▼39.69
Add New Post /wp-admin/post-new.php1.80 ▼3.645.38 ▼660.90
Media Library /wp-admin/upload.php1.80 ▼1.205.54 ▼30.57
Emolytics Options /wp-admin/options-general.php?page=wp_plugin_template1.805.10

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Emolytics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,793 ▲19816.29 ▲0.8010.19 ▲1.6153.22 ▼0.76
Dashboard /wp-admin2,969 ▲386.11 ▲0.16156.18 ▲1.77121.88 ▲4.69
Posts /wp-admin/edit.php2,744 ▲52.70 ▼0.0067.61 ▼9.3796.68 ▼1.07
Add New Post /wp-admin/post-new.php1,686 ▲9518.37 ▼0.15374.11 ▼23.13117.31 ▲3.09
Media Library /wp-admin/upload.php1,815 ▲55.02 ▼0.03153.70 ▼1.18125.10 ▼2.12
Emolytics Options /wp-admin/options-general.php?page=wp_plugin_template1,0432.1055.9079.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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+5663
    wp_enqueue_script 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 jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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 server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wp_plugin_template
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script 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 jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/getsmily/templates/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/getsmily/wp_plugin_template.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/getsmily/templates/post-type-template_metabox.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === getsmily === )
Please take inspiration from this readme.txt

getsmily/wp_plugin_template.php 92% from 13 tests

The main PHP file in "Emolytics" ver. 1.1.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("getsmily.php" instead of "wp_plugin_template.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin135 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4820135

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin