10% wp-easystatic

Code Review | WP Easystatic

WordPress plugin WP Easystatic scored 10% from 54 tests.

About plugin

  • Plugin page: wp-easystatic
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Dec 16, 2019
  • Latest release: Dec 26, 2019
  • Number of updates: 7
  • Update frequency: every 1.7 days
  • Top authors: xiliumcodedev (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 706 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/wp-easystatic/wp-easystatic-function.php+73
    mkdir(): No such file or directory

Server metrics [RAM: ▲0.07MB] [CPU: ▲0.72ms] Passed 4 tests

This is a short check of server-side resources used by WP Easystatic
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.49 ▼0.25
Dashboard /wp-admin3.36 ▲0.0644.64 ▼5.28
Posts /wp-admin/edit.php3.48 ▲0.1248.15 ▲5.38
Add New Post /wp-admin/post-new.php6.06 ▲0.18129.12 ▲28.62
Media Library /wp-admin/upload.php3.29 ▲0.0636.40 ▲3.02
Easystatic /wp-admin/options-general.php?page=easystatic3.3036.14

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

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • Illegal file modification detected: 2 files (0.00KB) outside of "wp-content/plugins/wp-easystatic/" and "wp-content/uploads/"
    • (new file) generate-files/.empty
    • (new file) wp-content/static-backup/.empty
Filesystem: 55 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
wp_static_page
widget_recent-comments
theysaidso_admin_options
wp_static_version
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Easystatic
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.79 ▲0.171.81 ▲0.0743.40 ▼5.36
Dashboard /wp-admin2,210 ▲254.86 ▼0.2696.08 ▼10.8337.37 ▲0.32
Posts /wp-admin/edit.php2,096 ▲72.01 ▲0.0040.28 ▲3.9734.72 ▲3.36
Add New Post /wp-admin/post-new.php1,538 ▲1023.31 ▲5.34659.45 ▲18.9261.72 ▲11.87
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.01104.59 ▲10.5144.41 ▼2.54
Easystatic /wp-admin/options-general.php?page=easystatic8991.8030.7439.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% 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 50% 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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-easystatic/includes/wp-easystatic-page.php:6
    • > PHP Notice
      Undefined variable: template in wp-content/plugins/wp-easystatic/includes/wp-easystatic-page.php on line 1
    • > PHP Warning
      Use of undefined constant EASYSTASTIC_SLUG - assumed 'EASYSTASTIC_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-easystatic/includes/lib/wp-easystatic-optimize.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-easystatic/wp-easystatic.php 92% from 13 tests

The entry point to "WP Easystatic" version 1.6.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • 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 Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected18,989 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript261,6221,16014,741
PHP178849933,454
CSS413530794

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity23.94
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes17
▷ Abstract classes15.88%
▷ Concrete classes1694.12%
▷ Final classes00.00%
Methods225
▷ Static methods4118.22%
▷ Public methods18582.22%
▷ Protected methods198.44%
▷ Private methods219.33%
Functions42
▷ Named functions00.00%
▷ Anonymous functions42100.00%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin