79% elementary

Code Review | Elementary

WordPress plugin Elementary scored 79% from 54 tests.

About plugin

  • Plugin page: elementary
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6.1
  • WordPress version: 5.8.1
  • First release: Oct 8, 2016
  • Latest release: Nov 16, 2016
  • Number of updates: 7
  • Update frequency: every 5.7 days
  • Top authors: Essekia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 4,662 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.49MB] [CPU: ▼202.63ms] Passed 4 tests

Server-side resources used by Elementary
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.25 ▲0.5439.49 ▲17.18
Dashboard /wp-admin3.16 ▲0.1123.32 ▼23.77
Posts /wp-admin/edit.php3.16 ▲0.0525.61 ▼19.26
Add New Post /wp-admin/post-new.php3.16 ▼2.2732.24 ▼761.89
Media Library /wp-admin/upload.php3.16 ▲0.1628.27 ▼5.59

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 135 new files
Database: no new tables, 2 new options
New WordPress options
elementary_db_version
elementary_plugin_version

Browser metrics Passed 4 tests

A check of browser resources used by Elementary
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,869 ▲27316.33 ▲0.6317.43 ▲8.4255.04 ▲7.33
Dashboard /wp-admin3,018 ▲816.10 ▲0.12152.62 ▲0.01116.36 ▲7.16
Posts /wp-admin/edit.php2,787 ▲482.72 ▲0.0078.47 ▲9.1796.06 ▲5.37
Add New Post /wp-admin/post-new.php1,716 ▲3318.57 ▼0.17461.72 ▲37.66118.29 ▼10.77
Media Library /wp-admin/upload.php1,855 ▲485.04 ▲0.05162.96 ▼2.53120.96 ▼5.33

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
The following items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5663
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options were found after uninstall: 1 option
    • elementary_db_version

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

elementary/elementary.php Passed 13 tests

The principal PHP file in "Elementary" v. 1.2 is loaded by WordPress automatically on each request
101 characters long description:
A drag and drop grid builder plugin to make grids, carousels, sliders, masonry and more. Beautifully.

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
Everything looks great! No dangerous files found in this plugin17,637 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript202,6839,37213,702
PHP286434502,529
CSS872191,406

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity19.90
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods62
▷ Static methods00.00%
▷ Public methods62100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions74
▷ Named functions74100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
50 PNG files occupy 3.95MB with 2.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/mocks/magazine.png40.90KB13.63KB▼ 66.67%
vendor/jQuery-ColorPicker/images/grabber.png0.33KB0.14KB▼ 55.86%
assets/images/elements-bundle/podcast-card.png132.51KB45.13KB▼ 65.95%
assets/images/transparent-square.png1.63KB0.12KB▼ 92.87%
vendor/jQuery-ColorPicker/images/gradient_input.png0.21KB0.19KB▼ 8.45%