72% foliopress-wysiwyg

Code Review | Foliopress WYSIWYG

WordPress plugin Foliopress WYSIWYG scored72%from 54 tests.

About plugin

  • Plugin page: foliopress-wysiwyg
  • Plugin version: 2.6.17
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.9.11
  • WordPress version: 6.3.1
  • First release: Oct 31, 2009
  • Latest release: Sep 17, 2019
  • Number of updates: 161
  • Update frequency: every 22.4 days
  • Top authors: FolioVision (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active /115,649 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼10.71ms] Passed 4 tests

This is a short check of server-side resources used by Foliopress WYSIWYG
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3545.91 ▲5.47
Dashboard /wp-admin3.71 ▲0.4150.72 ▲1.19
Posts /wp-admin/edit.php3.76 ▲0.4147.14 ▼1.10
Add New Post /wp-admin/post-new.php5.79 ▼0.0974.42 ▼47.50
Media Library /wp-admin/upload.php3.57 ▲0.3437.24 ▲4.59
Foliopress WYSIWYG /wp-admin/options-general.php?page=fv_wysiwyg3.6732.57

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 369 new files
Database: no new tables, 9 new options
New WordPress options
fp_wysiwyg
widget_recent-comments
fv_default_post_edit_rows
db_upgraded
can_compress_scripts
widget_theysaidso_widget
fp_wysiwyg_version
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Foliopress WYSIWYG
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲11713.67 ▼0.771.80 ▲0.1842.43 ▼4.95
Dashboard /wp-admin2,258 ▲735.02 ▼0.84108.26 ▲10.0042.17 ▼1.38
Posts /wp-admin/edit.php2,151 ▲592.52 ▲0.3945.27 ▲2.7036.33 ▲0.57
Add New Post /wp-admin/post-new.php6,137 ▲4,60324.56 ▲1.32792.72 ▲158.8466.84 ▲11.12
Media Library /wp-admin/upload.php1,456 ▲654.44 ▲0.25102.41 ▲2.5740.22 ▼3.99
Foliopress WYSIWYG /wp-admin/options-general.php?page=fv_wysiwyg1,5612.0636.5528.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_theysaidso_widget
    • fp_wysiwyg
    • db_upgraded
    • widget_recent-posts
    • fv_default_post_edit_rows
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • fp_wysiwyg_version

Smoke tests 25% 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
    • > GET request to /wp-admin/options-general.php?page=fv_wysiwyg
    • > Notice in wp-content/plugins/foliopress-wysiwyg/view/options.php+314
    Undefined index: image_template

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/foliopress-wysiwyg/custom-config/foliopress-editor.php
    • > /wp-content/plugins/foliopress-wysiwyg/view/edit.php
    • > /wp-content/plugins/foliopress-wysiwyg/fckeditor/editor/plugins/FVWPFlowplayer/fv_wp_flowplayer.php
    • > /wp-content/plugins/foliopress-wysiwyg/custom-config/foliopress-wysiwyg-config-js.php
    • > /wp-content/plugins/foliopress-wysiwyg/view/message.php
    • > /wp-content/plugins/foliopress-wysiwyg/fckeditor/editor/dialog/internal-link.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      file_get_contents(): Filename cannot be empty in wp-content/plugins/foliopress-wysiwyg/view/edit.php on line 4
    • > PHP Notice
      Undefined variable: strFile in wp-content/plugins/foliopress-wysiwyg/view/edit.php on line 2
    • > PHP Notice
      Undefined variable: strMessage in wp-content/plugins/foliopress-wysiwyg/view/message.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/foliopress-wysiwyg/view/options.php:2
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/foliopress-wysiwyg/view/recreate.php:8
    • > PHP Notice
      Undefined variable: strFile in wp-content/plugins/foliopress-wysiwyg/view/edit.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Foliopress WYSIWYG default toolbar), #2 (Image Management Window with the insert thumbnail options), #3 (Options screen)
You can look at the official readme.txt

foliopress-wysiwyg/foliopress-wysiwyg.php Passed 13 tests

The primary PHP file in "Foliopress WYSIWYG" version 2.6.17 is used by WordPress to initiate all plugin functionality
61 characters long description:
WYSIWYG FCKEditor with custom Image Management and nice skin.

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
No dangerous file extensions were detected49,794 lines of code in 195 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1003,9184,70430,016
HTML461,06097211,607
CSS155514843,105
PHP186959852,824
PO File3344670858
XML434126397
ColdFusion34594256
Perl24352243
ColdFusion CFScript12812192
ASP15512176
Python12124117
Markdown1103

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity62.83
▷ Minimum class complexity11.00
▷ Maximum class complexity247.00
Average method complexity5.64
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods80
▷ Static methods00.00%
▷ Public methods80100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants29
▷ Global constants26.90%
▷ Class constants2793.10%
▷ Public constants27100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
26 PNG files occupy 0.52MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fckeditor/editor/css/images/block_blockquote.png0.29KB0.14KB▼ 50.17%
screenshot-2.png192.06KB57.30KB▼ 70.16%
fckeditor/editor/skins/office2003/images/dialog.sides.rtl.png0.20KB0.19KB▼ 4.39%
fckeditor/editor/skins/silver/images/sprites.png3.20KB2.21KB▼ 30.84%
fckeditor/editor/skins/office2003/images/dialog.sides.png0.20KB0.19KB▼ 3.45%