84% genesis-simple-love

Code Review | Genesis Simple Love

WordPress plugin Genesis Simple Love scored84%from 54 tests.

About plugin

  • Plugin page: genesis-simple-love
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7.3
  • WordPress version: 6.3.1
  • First release: Sep 25, 2015
  • Latest release: Mar 15, 2017
  • Number of updates: 11
  • Update frequency: every 48.9 days
  • Top authors: phpbits (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /3,386 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.11ms] Passed 4 tests

Analyzing server-side resources used by Genesis Simple Love
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0625.27 ▼13.09
Dashboard /wp-admin3.32 ▲0.0242.32 ▼5.16
Posts /wp-admin/edit.php3.37 ▲0.0244.80 ▼6.38
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.51 ▼7.79
Media Library /wp-admin/upload.php3.24 ▲0.0234.63 ▼0.34

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_genesis_simple_love
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Genesis Simple Love: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,465 ▼27013.30 ▼1.380.57 ▼1.1017.74 ▼20.65
Dashboard /wp-admin2,209 ▲245.86 ▲0.97109.95 ▲8.0340.51 ▼5.95
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0739.56 ▼7.7534.47 ▼1.27
Add New Post /wp-admin/post-new.php1,522 ▼1123.36 ▲0.11689.81 ▼2.2867.88 ▲22.57
Media Library /wp-admin/upload.php1,388 ▼04.19 ▲0.0194.66 ▼17.7145.54 ▼2.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_genesis_simple_love
    • widget_recent-posts
    • db_upgraded

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
Good news, no errors were detected

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
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/genesis-simple-love/includes/widget.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-simple-love/plugin.php:14

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Love it!), #2 (Most Loved Widget)
Please take inspiration from this readme.txt

genesis-simple-love/plugin.php 92% from 13 tests

The main file in "Genesis Simple Love" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("genesis-simple-love.php" instead of "plugin.php")

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 detected253 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP34561193
JavaScript13840
CSS16020

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity13.50
▷ Minimum class complexity13.00
▷ Maximum class complexity14.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.18MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png9.34KB4.19KB▼ 55.14%
screenshot-2.png177.75KB62.40KB▼ 64.90%