77% wpx-followgram-light

Code Review | WPX Followgram Light

WordPress plugin WPX Followgram Light scored77%from 54 tests.

About plugin

  • Plugin page: wpx-followgram-light
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8
  • WordPress version: 6.3.1
  • First release: Dec 29, 2014
  • Latest release: Sep 7, 2021
  • Number of updates: 40
  • Update frequency: every 61.1 days
  • Top authors: gfazioli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /820 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼3.25ms] Passed 4 tests

An overview of server-side resources used by WPX Followgram Light
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3044.91 ▼0.09
Dashboard /wp-admin3.75 ▲0.4554.31 ▲1.61
Posts /wp-admin/edit.php3.80 ▲0.4552.72 ▲0.06
Add New Post /wp-admin/post-new.php6.27 ▲0.3992.72 ▼14.58
Media Library /wp-admin/upload.php3.61 ▲0.3944.12 ▲8.65
Account Settings /wp-admin/admin.php?page=wpx_followgram_light_slug_menu3.6637.89
Widget /wp-admin/admin.php?page=wpxfollowgramlight_13.6337.20

Server storage [IO: ▲14.78MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/wpx-followgram-light/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 105 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
wpx_followgram_light_slug
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_followgram-widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPX Followgram Light
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10514.44 ▼0.202.05 ▲0.2038.51 ▼8.41
Dashboard /wp-admin2,232 ▲265.86 ▼0.04104.27 ▼1.9881.46 ▲39.27
Posts /wp-admin/edit.php2,129 ▲322.01 ▼0.0546.56 ▲10.7734.89 ▲1.31
Add New Post /wp-admin/post-new.php1,557 ▲1423.39 ▲0.26767.42 ▲74.3155.89 ▼15.77
Media Library /wp-admin/upload.php1,420 ▲204.25 ▲0.0398.75 ▼12.3877.19 ▲32.18
Account Settings /wp-admin/admin.php?page=wpx_followgram_light_slug_menu8622.0526.7531.00
Widget /wp-admin/admin.php?page=wpxfollowgramlight_18382.0124.7129.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_followgram-widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • wpx_followgram_light_slug
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 33× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wpx-followgram-light/config/menus.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wpx-followgram-light/resources/views/dashboard/index.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WPXFollowgramLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-followgram-light/vendor/wpbones/wpbones/src/Html/HtmlTagForm.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPXFollowgramLight\\Http\\Controllers\\Controller' not found in wp-content/plugins/wpx-followgram-light/plugin/Http/Controllers/Dashboard/DashboardController.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpx-followgram-light/resources/views/widgets/index.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WPXFollowgramLight\\WPBones\\Support\\Widget' not found in wp-content/plugins/wpx-followgram-light/plugin/Widgets/FollowgramWidget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPXFollowgramLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-followgram-light/vendor/wpbones/wpbones/src/Html/HtmlTagSelect.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPXFollowgramLight\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wpx-followgram-light/vendor/wpbones/wpbones/src/Html/HtmlTagButton.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function flush_rewrite_rules() in wp-content/plugins/wpx-followgram-light/plugin/deactivation.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPXFollowgramLight\\WPBones\\Html\\HtmlTagInput' not found in wp-content/plugins/wpx-followgram-light/vendor/wpbones/wpbones/src/Html/HtmlTagCheckbox.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wpxfollowgramlight_1
    • > Network (severe)
    wp-content/plugins/wpx-followgram-light/public/js/wpxfg-admin.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: followgram, instagram

wpx-followgram-light/index.php 77% from 13 tests

Analyzing the main PHP file in "WPX Followgram Light" version 2.1.0
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpx-followgram-light.php" instead of "index.php")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/localization")
  • Domain Path: The domain path should use only dashes and lowercase characters ("localization")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin5,344 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
PHP681,3432,5154,976
Markdown5640156
JSON20096
PO File2417660
JavaScript2131240
CSS501916

PHP code Passed 2 tests

An overview of 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.41
Average class complexity10.28
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces19
Interfaces2
Traits0
Classes41
▷ Abstract classes1024.39%
▷ Concrete classes3175.61%
▷ Final classes00.00%
Methods242
▷ Static methods4920.25%
▷ Public methods19178.93%
▷ Protected methods3916.12%
▷ Private methods124.96%
Functions18
▷ Named functions1266.67%
▷ Anonymous functions633.33%
Constants1
▷ Global constants1100.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
6 PNG files occupy 0.29MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/screenshot-1.png44.92KB16.33KB▼ 63.64%
public/images/screenshot-2.png88.66KB32.00KB▼ 63.90%
assets/screenshot-2.png36.40KB11.38KB▼ 68.73%
assets/screenshot-1.png35.58KB12.72KB▼ 64.25%
public/images/logo-16x16.png0.62KB0.62KB0.00%