68% export-wp-page-to-static-html

Code Review | Export WP Page to Static HTML/CSS

WordPress plugin Export WP Page to Static HTML/CSS scored68%from 54 tests.

About plugin

  • Plugin page: export-wp-page-to...
  • Plugin version: 2.2.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.4
  • WordPress version: 6.3.1
  • First release: Jun 2, 2020
  • Latest release: Nov 30, 2023
  • Number of updates: 55
  • Update frequency: every 23.2 days
  • Top authors: recorp (100%)

Code review

54 tests

User reviews

44 reviews

Install metrics

6,000+ active /94,939 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.37MB] [CPU: ▲1.45ms] Passed 4 tests

Server-side resources used by Export WP Page to Static HTML/CSS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.83 ▲1.3743.23 ▼0.07
Dashboard /wp-admin4.71 ▲1.4156.67 ▲9.02
Posts /wp-admin/edit.php4.76 ▲1.4154.71 ▲5.45
Add New Post /wp-admin/post-new.php7.23 ▲1.3492.91 ▼8.60
Media Library /wp-admin/upload.php4.57 ▲1.3446.55 ▲14.58

Server storage [IO: ▲0.53MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 63 new files
Database: 2 new tables, 7 new options
New tables
wp_export_page_to_html_logs
wp_export_urls_logs
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
wpptsh_notices
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Export WP Page to Static HTML/CSS: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11814.23 ▼0.482.11 ▲0.2541.47 ▼0.94
Dashboard /wp-admin2,239 ▲655.78 ▲0.2296.42 ▼25.0294.32 ▲50.50
Posts /wp-admin/edit.php2,165 ▲622.14 ▲0.1836.76 ▼4.4140.98 ▲3.81
Add New Post /wp-admin/post-new.php1,603 ▲7423.15 ▼0.51676.37 ▲72.0053.60 ▼20.28
Media Library /wp-admin/upload.php1,456 ▲564.14 ▼0.0297.85 ▼25.6589.09 ▲37.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_export_page_to_html_logs
    • wp_export_urls_logs
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • wpptsh_notices
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/export-wp-page-to-static-html/admin/partials/Tabs/ftp-settings.php
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/export-wp-page-to-static-html/admin/partials/Tabs/advanced-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ExportHtmlAdmin\\Export_Wp_Page_To_Static_Html_Admin' not found in wp-content/plugins/export-wp-page-to-static-html/admin/includes/AjaxRequests/cancelRcExportProcess.php:6
    • > PHP Notice
      Undefined variable: pass in wp-content/plugins/export-wp-page-to-static-html/admin/partials/Tabs/ftp-settings.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'ExportHtmlAdmin\\Export_Wp_Page_To_Static_Html_Admin' not found in wp-content/plugins/export-wp-page-to-static-html/admin/includes/AjaxRequests/exportLogPercentage.php:6
    • > PHP Notice
      Undefined variable: ftp_status in wp-content/plugins/export-wp-page-to-static-html/admin/partials/Tabs/ftp-settings.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/export-wp-page-to-static-html/includes/global_functions.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/export-wp-page-to-static-html/admin/partials/export-wp-page-to-static-html-admin-display.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/export-wp-page-to-static-html/admin/partials/Tabs/custom-url.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'ExportHtmlAdmin\\Export_Wp_Page_To_Static_Html_Admin' not found in wp-content/plugins/export-wp-page-to-static-html/admin/includes/AjaxRequests/requestForWpPageToStaticHtml.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ExportHtmlAdmin\\Export_Wp_Page_To_Static_Html_Admin' not found in wp-content/plugins/export-wp-page-to-static-html/admin/includes/AjaxRequests/deleteExportedZipFile.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

export-wp-page-to-static-html/export-wp-page-to-static-html.php Passed 13 tests

The main PHP file in "Export WP Page to Static HTML/CSS" ver. 2.2.1 adds more information about the plugin and also serves as the entry point for this plugin
47 characters long description:
Export any WP Page to html and css very easily.

Code Analysis Passed 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 plugin9,066 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP431,7321,5126,555
CSS21781551,753
JavaScript5140102758

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity38.57
▷ Minimum class complexity1.00
▷ Maximum class complexity295.00
Average method complexity5.06
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces21
Interfaces0
Traits0
Classes30
▷ Abstract classes13.33%
▷ Concrete classes2996.67%
▷ Final classes00.00%
Methods277
▷ Static methods62.17%
▷ Public methods25592.06%
▷ Protected methods155.42%
▷ Private methods72.53%
Functions30
▷ Named functions2996.67%
▷ Anonymous functions13.33%
Constants25
▷ Global constants25100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/html-icon.png0.99KB0.33KB▼ 66.63%
admin/images/folder.png0.37KB0.28KB▼ 23.61%
admin/images/recorp-logo.png10.36KB3.47KB▼ 66.54%
admin/images/settings-hover.png2.47KB1.76KB▼ 28.48%
admin/images/down-arrow.png2.86KB2.21KB▼ 22.82%