68% codepile

Code Review | CodePile

WordPress plugin CodePile scored 68% from 54 tests.

About plugin

  • Plugin page: codepile
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.2-5.9.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2020
  • Latest release: Mar 18, 2022
  • Number of updates: 18
  • Update frequency: every 35.5 days
  • Top authors: ryvix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 710 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.27MB] [CPU: ▲35.06ms] 75% from 4 tests

A check of server-side resources used by CodePile
Please fix the following
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.27MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.72 ▲5.2677.24 ▲35.74
Dashboard /wp-admin8.74 ▲5.4489.56 ▲37.63
Posts /wp-admin/edit.php8.74 ▲5.3983.17 ▲34.22
Add New Post /wp-admin/post-new.php10.86 ▲4.97123.94 ▲32.63
Media Library /wp-admin/upload.php8.74 ▲5.5282.75 ▲47.32
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.7468.81

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 658 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
fs_gdpr
widget_recent-comments
fs_accounts
widget_theysaidso_widget
theysaidso_admin_options
fs_active_plugins
widget_recent-posts
fs_debug_mode
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by CodePile
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,121 ▲38618.46 ▲3.781.77 ▲0.1227.56 ▼23.17
Dashboard /wp-admin2,506 ▲3359.25 ▲4.37162.20 ▲52.8994.71 ▲57.72
Posts /wp-admin/edit.php2,433 ▲3446.23 ▲4.2076.71 ▲38.0994.50 ▲58.56
Add New Post /wp-admin/post-new.php1,857 ▲32921.95 ▲3.86680.73 ▲17.7836.25 ▼32.38
Media Library /wp-admin/upload.php1,557 ▲1726.58 ▲2.34116.38 ▲14.5782.42 ▲41.53
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,3905.9968.5071.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/codepile/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 10 options
    • fs_accounts
    • fs_debug_mode
    • fs_active_plugins
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • fs_gdpr
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/codepile/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 113× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/codepile/vendor/htmlburger/carbon-fields/core/Field/Color_Field.php:8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/codepile/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 35
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/codepile/vendor/htmlburger/carbon-fields/core/Container/Block_Container.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/codepile/vendor/htmlburger/carbon-fields/core/Field/Sidebar_Field.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/codepile/vendor/htmlburger/carbon-fields/core/Field/Association_Field.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/codepile/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Any_Contain_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Meta_Datastore' not found in wp-content/plugins/codepile/vendor/htmlburger/carbon-fields/core/Datastore/Network_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/codepile/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Contain_Comparer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Fulfillable\\Translator\\Translator' not found in wp-content/plugins/codepile/vendor/htmlburger/carbon-fields/core/Container/Fulfillable/Translator/Array_Translator.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/codepile/vendor/htmlburger/carbon-fields/core/Field/Broken_Field.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: date, memory limit, jquery ui theme, comment form, icons...

codepile/codepile.php 92% from 13 tests

The main file in "CodePile" v. 1.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.9" instead of "5.9.2")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected59,876 lines of code in 562 files:
LanguageFilesBlank linesComment linesLines of code
PHP28610,03623,80240,350
JavaScript1745,2228,51813,127
PO File268191,0202,202
Sass4833901,769
CSS193271,1581,689
JSON400507
Markdown5990232

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity26.02
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces28
Interfaces5
Traits0
Classes198
▷ Abstract classes136.57%
▷ Concrete classes18593.43%
▷ Final classes10.54%
Methods2,117
▷ Static methods30714.50%
▷ Public methods1,60375.72%
▷ Protected methods1848.69%
▷ Private methods33015.59%
Functions197
▷ Named functions11658.88%
▷ Anonymous functions8141.12%
Constants157
▷ Global constants10868.79%
▷ Class constants4931.21%
▷ Public constants49100.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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
admin/assets/images/codepile-20x20.png0.45KB0.43KB▼ 3.27%
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
admin/assets/images/codepile-100x100.png0.90KB0.70KB▼ 22.78%