78% ganxy-embed

Code Review | Ganxy Embed

WordPress plugin Ganxy Embed scored78%from 54 tests.

About plugin

  • Plugin page: ganxy-embed
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Aug 21, 2015
  • Latest release: May 29, 2018
  • Number of updates: 4
  • Update frequency: every 253.0 days
  • Top authors: prophecy2040 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /5,577 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.10MB] [CPU: ▼12.17ms] Passed 4 tests

Analyzing server-side resources used by Ganxy Embed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.57 ▼7.33
Dashboard /wp-admin3.44 ▲0.1449.20 ▼3.05
Posts /wp-admin/edit.php3.49 ▲0.1447.87 ▼9.32
Add New Post /wp-admin/post-new.php6.02 ▲0.1483.51 ▼28.98
Media Library /wp-admin/upload.php3.37 ▲0.1433.45 ▼2.43
Ganxy Plugin Help /wp-admin/plugins.php?page=ganxy-help-page3.3532.40

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Ganxy Embed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲13113.49 ▼0.868.79 ▲7.2342.46 ▲3.48
Dashboard /wp-admin2,202 ▲255.64 ▲0.0284.71 ▼1.8639.76 ▼15.81
Posts /wp-admin/edit.php2,104 ▲12.02 ▼0.1338.17 ▼4.0734.17 ▼1.40
Add New Post /wp-admin/post-new.php1,535 ▲723.17 ▲0.18650.59 ▼12.5749.82 ▼15.47
Media Library /wp-admin/upload.php1,410 ▲104.17 ▼0.0196.57 ▼12.6742.00 ▼3.87
Ganxy Plugin Help /wp-admin/plugins.php?page=ganxy-help-page1,3372.0022.2341.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ganxy-embed/inc/plugin-update.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ganxy-embed/ganxy-embed.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Visual Editor Ganxy Embed menu items.), #2 (Editor Popup options.)
Please take inspiration from this readme.txt

ganxy-embed/ganxy-embed.php Passed 13 tests

"Ganxy Embed" version 1.4.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
73 characters long description:
Official WordPress Plugin to Embed Ganxy products by URL or Embed script.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin2,247 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PO File22952981,120
JavaScript61911595
PHP322109433
CSS32266
SVG10033

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity37.50
▷ Minimum class complexity32.00
▷ Maximum class complexity43.00
Average method complexity5.87
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.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
7 PNG files occupy 0.39MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/screen2.png85.35KB26.13KB▼ 69.38%
js/img/ganxy-music.png19.71KB7.32KB▼ 62.88%
js/img/ganxy-bundle.png20.99KB8.32KB▼ 60.38%
img/screen1.png154.87KB47.37KB▼ 69.41%
js/img/ganxy-light.png18.78KB7.68KB▼ 59.11%