78% easy-pixels-by-jevnet

Code Review | Easy Pixels

WordPress plugin Easy Pixels scored78%from 54 tests.

About plugin

  • Plugin page: easy-pixels-by-je...
  • Plugin version: 2.13
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 11, 2019
  • Latest release: Apr 7, 2022
  • Number of updates: 102
  • Update frequency: every 11.3 days
  • Top authors: jevnet (58.82%)sperpina (42.16%)

Code review

54 tests

User reviews

3 reviews

Install metrics

6,000+ active /38,384 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: ▲0.02MB] [CPU: ▼6.88ms] Passed 4 tests

An overview of server-side resources used by Easy Pixels
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0647.93 ▲7.41
Dashboard /wp-admin3.33 ▼0.0252.27 ▼4.55
Posts /wp-admin/edit.php3.44 ▲0.0843.30 ▼6.47
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.50 ▼17.28
Media Library /wp-admin/upload.php3.25 ▲0.0236.62 ▲0.80

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 43 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
jnEasyPixelsSettings-group
jn_easypixels
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Pixels
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.28 ▼0.091.85 ▲0.0545.45 ▲1.33
Dashboard /wp-admin2,195 ▲215.58 ▲0.0196.35 ▲5.1183.37 ▲43.57
Posts /wp-admin/edit.php2,112 ▲91.98 ▼0.1535.91 ▼7.7233.52 ▼4.36
Add New Post /wp-admin/post-new.php1,561 ▲3522.92 ▼0.58636.72 ▼54.24157.48 ▲99.58
Media Library /wp-admin/upload.php1,415 ▲184.28 ▲0.0698.93 ▼17.7973.56 ▲28.43

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • theysaidso_admin_options
    • can_compress_scripts
    • jn_easypixels
    • jnEasyPixelsSettings-group
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-pixels-by-jevnet/easyPixels.php
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-pixels-by-jevnet/admin/tabs.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Easypixels_network' not found in wp-content/plugins/easy-pixels-by-jevnet/classes/easy-gads.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Easypixels_network' not found in wp-content/plugins/easy-pixels-by-jevnet/classes/easy-bing.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-pixels-by-jevnet/admin/easyPixelsAdmin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Easypixels_network' not found in wp-content/plugins/easy-pixels-by-jevnet/classes/easy-analytics.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Easypixels_network' not found in wp-content/plugins/easy-pixels-by-jevnet/classes/easy-linkedin.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Easypixels_network' not found in wp-content/plugins/easy-pixels-by-jevnet/classes/easy-tw.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/easy-pixels-by-jevnet/admin/page-cf7NotInstalled.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Easypixels_network' not found in wp-content/plugins/easy-pixels-by-jevnet/classes/easy-facebook.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Easypixels_network' not found in wp-content/plugins/easy-pixels-by-jevnet/classes/easy-yandex.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
These attributes need your attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can look at the official readme.txt

easy-pixels-by-jevnet/easyPixels.php 92% from 13 tests

The entry point to "Easy Pixels" version 2.13 is a PHP file that has certain tags in its header comment area
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 ("easy-pixels-by-jevnet.php" instead of "easyPixels.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 plugin1,321 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP17186601,039
PO File28091280
SVG2002

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.35
Average class complexity6.32
▷ Minimum class complexity2.00
▷ Maximum class complexity24.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods95
▷ Static methods1111.58%
▷ Public methods8993.68%
▷ Protected methods11.05%
▷ Private methods55.26%
Functions30
▷ Named functions2170.00%
▷ Anonymous functions930.00%
Constants2
▷ Global constants2100.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
11 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/twitter.png2.34KB2.33KB▼ 0.58%
img/woocommerce.png2.62KB1.85KB▼ 29.39%
img/icon20x20.png0.54KB0.63KB0.00%
img/google.png4.71KB2.38KB▼ 49.41%
img/share.png12.23KB2.82KB▼ 76.91%