10% suscriptflech

Code Review | Suscriptflech

WordPress plugin Suscriptflech scored10%from 54 tests.

About plugin

  • Plugin page: suscriptflech
  • Plugin version: 3.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Oct 30, 2014
  • Latest release: Mar 14, 2016
  • Number of updates: 112
  • Update frequency: every 4.5 days
  • Top authors: catscs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /6,099 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/suscriptflech/admin/includes/PHPExcel/Shared/String.php+529
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.68MB] [CPU: ▼48.68ms] Passed 4 tests

Analyzing server-side resources used by Suscriptflech
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.167.84 ▼30.35
Dashboard /wp-admin2.32 ▼0.986.79 ▼42.81
Posts /wp-admin/edit.php2.33 ▼1.036.67 ▼42.24
Add New Post /wp-admin/post-new.php2.32 ▼3.567.44 ▼79.33
Media Library /wp-admin/upload.php2.32 ▼0.906.84 ▼27.07
Suscriptores /wp-admin/edit.php?post_type=emails2.337.14
Suscriptflech /wp-admin/options-general.php?page=suscriptflech-settings-settings2.336.39
Añadir suscriptor /wp-admin/post-new.php?post_type=emails2.336.15
Enviar emails /wp-admin/edit.php?post_type=emails&page=envioemails2.337.69

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 348 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_widget-suscriptflech
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Suscriptflech
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,058 ▲29714.83 ▲0.465.59 ▲3.9641.94 ▲2.81
Dashboard /wp-admin2,375 ▲2016.15 ▲0.48114.84 ▲27.0340.72 ▼4.65
Posts /wp-admin/edit.php2,309 ▲2093.38 ▲1.3144.41 ▲4.5328.79 ▼10.25
Add New Post /wp-admin/post-new.php1,591 ▲6323.43 ▲0.35671.64 ▲2.2435.87 ▼15.98
Media Library /wp-admin/upload.php1,446 ▲464.13 ▼0.0078.91 ▼28.0444.78 ▲0.73
Suscriptores /wp-admin/edit.php?post_type=emails1,2543.3343.7831.98
Suscriptflech /wp-admin/options-general.php?page=suscriptflech-settings-settings1,6413.4557.3565.36
Añadir suscriptor /wp-admin/post-new.php?post_type=emails1,7123.9686.1138.21
Enviar emails /wp-admin/edit.php?post_type=emails&page=envioemails1,4506.78107.6182.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/suscriptflech/admin/includes/PHPExcel/Shared/String.php+529
    Array and string offset access syntax with curly braces is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_widget-suscriptflech
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=emails&page=envioemails
    • > Deprecated in wp-content/plugins/suscriptflech/admin/includes/PHPExcel/Shared/String.php+537
    Array and string offset access syntax with curly braces is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=emails&page=envioemails
    • > Deprecated in wp-content/plugins/suscriptflech/admin/includes/custom-widget/plugin.php+260
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=emails&page=envioemails
    • > Warning in wp-content/plugins/suscriptflech/admin/includes/custom-metaboxes/init.php+746
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/options-general.php?page=suscriptflech-settings-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=suscriptflech-settings-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Almost there! Just fix the following items
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/suscriptflech/public/views/public.php
    • > /wp-content/plugins/suscriptflech/admin/includes/custom-widget/views/admin.php
    • > /wp-content/plugins/suscriptflech/admin/includes/custom-metaboxes/tests/phpunit/includes/bootstrap.php
    • > /wp-content/plugins/suscriptflech/admin/includes/reportes/excel.php
  • 111× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/suscriptflech/admin/includes/PHPExcel/Style/Border.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/suscriptflech/admin/includes/PHPExcel/Style/Protection.php:36
    • > PHP Warning
      require_once(PHPEXCEL_ROOTPHPExcel/Shared/trend/linearBestFitClass.php): failed to open stream: No such file or directory in wp-content/plugins/suscriptflech/admin/includes/PHPExcel/Shared/trend/trendClass.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/suscriptflech/admin/includes/PHPExcel/Writer/Excel2007/Theme.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/suscriptflech/admin/includes/custom-metaboxes/metabox.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/suscriptflech/admin/includes/custom-metaboxes/tests/phpunit/tests/CMB_Core_Test.php:3
    • > PHP Warning
      require_once(PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php): failed to open stream: No such file or directory in wp-content/plugins/suscriptflech/admin/includes/PHPExcel/Shared/trend/linearBestFitClass.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Exception' not found in wp-content/plugins/suscriptflech/admin/includes/PHPExcel/Calculation/Exception.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Style_Supervisor' not found in wp-content/plugins/suscriptflech/admin/includes/PHPExcel/Style/NumberFormat.php:36
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPEXCEL_ROOTPHPExcel/Shared/trend/bestFitClass.php' (include_path='.:/usr/share/php') in wp-content/plugins/suscriptflech/admin/includes/PHPExcel/Shared/trend/linearBestFitClass.php on line 29

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=suscriptflech-settings-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=suscriptflech-settings-settings:284:58)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=suscriptflech-settings-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=suscriptflech-settings-settings:297:58)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=suscriptflech-settings-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=suscriptflech-settings-settings:310:51)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=suscriptflech-settings-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=suscriptflech-settings-settings:323:51)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=suscriptflech-settings-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=suscriptflech-settings-settings:336:51)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=suscriptflech-settings-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=suscriptflech-settings-settings:349:57)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1:2:27292)" undefined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=suscriptflech-settings-settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,farbtastic&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
The official readme.txt might help

suscriptflech/suscriptflech.php 85% from 13 tests

The main PHP file in "Suscriptflech" ver. 3.5.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 144 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin59,207 lines of code in 246 files:
LanguageFilesBlank linesComment linesLines of code
PHP22312,68837,40955,842
JavaScript93124102,254
CSS56122542
Markdown41410427
Bourne Shell115459
JSON10031
YAML15018
PO File10017
XML10117

PHP code 0% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,176)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity54.21
▷ Minimum class complexity1.00
▷ Maximum class complexity1,176.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes194
▷ Abstract classes63.09%
▷ Concrete classes18896.91%
▷ Final classes00.00%
Methods2,932
▷ Static methods66622.71%
▷ Public methods2,41782.44%
▷ Protected methods331.13%
▷ Private methods48216.44%
Functions34
▷ Named functions3088.24%
▷ Anonymous functions411.76%
Constants803
▷ Global constants12014.94%
▷ Class constants68385.06%
▷ Public constants683100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
27 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/includes/custom-widget/images/check.png3.46KB0.73KB▼ 78.87%
admin/assets/images/twitter.png0.71KB0.49KB▼ 30.06%
(invalid) public/assets/images/._check.png4.00KB0.00KB▼ 100.00%
(invalid) admin/includes/custom-widget/images/._check.png4.00KB0.00KB▼ 100.00%
admin/includes/custom-metaboxes/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%