73% easygram

Code Review | Easygram

WordPress plugin Easygram scored 73% from 54 tests.

About plugin

  • Plugin page: easygram
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.1
  • WordPress version: 5.9.2
  • First release: Oct 21, 2012
  • Latest release: Oct 26, 2012
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: obox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 7,039 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.13MB] [CPU: ▼324.40ms] Passed 4 tests

Server-side resources used by Easygram
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1753.60 ▲4.42
Dashboard /wp-admin3.20 ▼0.2118.52 ▼15.60
Posts /wp-admin/edit.php3.20 ▼0.4518.61 ▼19.23
Add New Post /wp-admin/post-new.php3.20 ▼3.7825.74 ▼1,254.63
Media Library /wp-admin/upload.php3.20 ▼0.1018.00 ▼8.13

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 1 new option
New WordPress options
eg_general_options

Browser metrics Passed 4 tests

Checking browser requirements for Easygram
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,520 ▼1,2346.91 ▼8.738.24 ▲2.472.60 ▼0.15
Dashboard /wp-admin1,859 ▼9993.38 ▼2.69117.34 ▼19.24183.78 ▲24.82
Posts /wp-admin/edit.php1,831 ▼8572.01 ▼1.2366.99 ▲3.15145.95 ▲1.93
Add New Post /wp-admin/post-new.php1,603 ▼14913.14 ▼8.35733.47 ▲275.89167.29 ▲6.34
Media Library /wp-admin/upload.php1,031 ▼6673.24 ▼2.26129.37 ▼15.25211.31 ▲24.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5316
    add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead.
  • Zombie WordPress options detected upon uninstall: 1 option
    • eg_general_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easygram/index.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/easygram/media-form.php:8
    • > PHP Warning
      opendir(EGDIRfunctions/): failed to open dir: No such file or directory in wp-content/plugins/easygram/functions/load-includes.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easygram/index.php on line 12
    • > PHP Warning
      Use of undefined constant EGDIR - assumed 'EGDIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/easygram/functions/load-includes.php on line 5
    • > PHP Notice
      Undefined index: post_id in wp-content/plugins/easygram/media-form.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Easygram Authorized), #2 (Add media pop up), #3 (Instagram Tab Selected)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === easygram === )
The official readme.txt might help

easygram/index.php 92% from 13 tests

Analyzing the main PHP file in "Easygram" version 1.0.1
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easygram.php" instead of "index.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
No dangerous file extensions were detected1,081 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP5108115680
CSS34486333
JavaScript211268

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity35.33
▷ Minimum class complexity7.00
▷ Maximum class complexity57.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/step-1.png15.10KB6.94KB▼ 54.04%
3-Instagram-Tab-Selected.png43.01KB12.83KB▼ 70.16%
css/images/instagram-32.png3.30KB0.46KB▼ 86.20%
1-Easygram-Authorized.png18.73KB8.01KB▼ 57.23%
css/images/step-2.png19.23KB7.82KB▼ 59.36%