69% easy-code-snippets

Code Review | Easy Code Snippets

WordPress plugin Easy Code Snippets scored 69% from 54 tests.

About plugin

  • Plugin page: easy-code-snippets
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Oct 26, 2018
  • Latest release: May 30, 2022
  • Number of updates: 15
  • Update frequency: every 87.5 days
  • Top authors: alphabposervice (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active / 3,065 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▼1.92ms] Passed 4 tests

This is a short check of server-side resources used by Easy Code Snippets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4946.82 ▲1.43
Dashboard /wp-admin3.80 ▲0.5048.14 ▼3.81
Posts /wp-admin/edit.php3.85 ▲0.5051.90 ▼0.69
Add New Post /wp-admin/post-new.php6.34 ▲0.45104.37 ▼4.61
Media Library /wp-admin/upload.php3.72 ▲0.4937.49 ▲5.91
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius3.9235.74

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 175 new files
Database: 1 new table, 11 new options
New tables
wp_ecs_snippets
New WordPress options
db_upgraded
can_compress_scripts
fs_gdpr
widget_recent-posts
widget_theysaidso_widget
fs_accounts
fs_active_plugins
theysaidso_admin_options
widget_recent-comments
fs_debug_mode
...

Browser metrics Passed 4 tests

Easy Code Snippets: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲10715.86 ▲1.482.16 ▲0.3038.49 ▼13.02
Dashboard /wp-admin2,262 ▲716.84 ▲1.75146.43 ▲28.6774.89 ▲31.14
Posts /wp-admin/edit.php2,147 ▲584.02 ▲2.0096.83 ▲58.8542.28 ▲8.22
Add New Post /wp-admin/post-new.php1,563 ▲2922.86 ▼0.32756.06 ▲75.5940.14 ▼23.45
Media Library /wp-admin/upload.php1,441 ▲565.82 ▲1.54153.12 ▲33.0884.70 ▲32.02
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0933.7989.3927.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/easy-code-snippets/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_ecs_snippets
  • Zombie WordPress options were found after uninstall: 11 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • fs_accounts
    • db_upgraded
    • widget_recent-comments
    • fs_debug_mode
    • fs_active_plugins
    • ecsnippets_version
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: custom css code, code snippets, custom js code, tracking code, google analitics code

easy-code-snippets/easy-code-snippets.php 77% from 13 tests

Analyzing the main PHP file in "Easy Code Snippets" version 1.0.1
It is important to fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 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 plugin31,320 lines of code in 132 files:
LanguageFilesBlank linesComment linesLines of code
PHP1157,37716,34330,854
Markdown1680214
JavaScript43760211
JSON10027
CSS110014

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity84.22
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods1,157
▷ Static methods17415.04%
▷ Public methods81770.61%
▷ Protected methods151.30%
▷ Private methods32528.09%
Functions99
▷ Named functions99100.00%
▷ Anonymous functions00.00%
Constants127
▷ Global constants10280.31%
▷ Class constants2519.69%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%