71% wp-instasass

Code Review | wp_instasass

WordPress plugin wp_instasass scored71%from 54 tests.

About plugin

  • Plugin page: wp-instasass
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.1
  • WordPress version: 6.3.1
  • First release: Jul 28, 2017
  • Latest release: Dec 13, 2017
  • Number of updates: 30
  • Update frequency: every 4.6 days
  • Top authors: siafixcms (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /655 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
This plugin's installer ran successfully

Server metrics [RAM: ▼14.46MB] [CPU: ▼2,944,061.47ms] Passed 4 tests

Server-side resources used by wp_instasass
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼58.097.11 ▼11,776,221.90
Dashboard /wp-admin3.45 ▲0.0653.56 ▼7.52
Posts /wp-admin/edit.php3.57 ▲0.1653.34 ▼1.57
Add New Post /wp-admin/post-new.php6.03 ▲0.1087.60 ▼14.88
Media Library /wp-admin/upload.php3.38 ▲0.1043.55 ▲9.15
InstaSASS settings /wp-admin/options-general.php?page=fixcms3.3236.57

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

Input-output and database impact of this plugin
Please fix the following
  • The plugin illegally modified 2 files (0.00KB) outside of "wp-content/plugins/wp-instasass/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/scss/0main.scss
    • (new file) wp-content/themes/twentytwentyone/scss/css/.empty
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for wp_instasass
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.391.78 ▼0.1342.57 ▼15.38
Dashboard /wp-admin2,196 ▲195.59 ▲0.0187.83 ▼7.6140.76 ▲1.78
Posts /wp-admin/edit.php2,101 ▲42.00 ▲0.0636.46 ▼2.8733.25 ▼1.69
Add New Post /wp-admin/post-new.php1,529 ▲323.42 ▼0.06685.96 ▲21.9951.26 ▼10.57
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.05109.96 ▲12.2646.88 ▲4.04
InstaSASS settings /wp-admin/options-general.php?page=fixcms9001.6927.8826.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fixcms
    • > Notice in wp-content/plugins/wp-instasass/wp_instasass.php+386
    Trying to access array offset on value of type bool
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fixcms
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fixcms
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-instasass/wp_instasass.php
  • 33× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/Validator/../../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/Validator/RpcFormatValidatorTest.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/ProcedureHandlerTest.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/Validator/../../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/Validator/UserValidatorTest.php on line 5
    • > PHP Warning
      require_once(wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/Response/../../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/Response/ResponseBuilderTest.php on line 11
    • > PHP Warning
      require_once(wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/ServerProtocolTest.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/MiddlewareHandlerTest.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-instasass/vendor/fixcms/instasass/example.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/Request/../../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/Request/RequestBuilderTest.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/ServerProtocolTest.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-instasass/vendor/fguillot/json-rpc/tests/HttpClientTest.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Donate link: Invalid URI ("")
  • Tags: No valid plugin tags found
You can look at the official readme.txt

wp-instasass/wp_instasass.php 85% from 13 tests

This is the main PHP file of "wp_instasass" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Git Repository: A Git repository was detected inside this plugin
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-instasass.php" instead of "wp_instasass.php")

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
Everything looks great! No dangerous files found in this plugin3,267 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP497411,4662,865
Markdown11100244
JSON400134
YAML14017
XML1007

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.33
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes50
▷ Abstract classes12.00%
▷ Concrete classes4998.00%
▷ Final classes00.00%
Methods229
▷ Static methods135.68%
▷ Public methods21593.89%
▷ Protected methods83.49%
▷ Private methods62.62%
Functions44
▷ Named functions1022.73%
▷ Anonymous functions3477.27%
Constants0
▷ Global constants00.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
No PNG files were detected