89% elements-ocean

Code Review | ElementsOcean

WordPress plugin ElementsOcean scored89%from 54 tests.

About plugin

  • Plugin page: elements-ocean
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Oct 26, 2022
  • Latest release: Nov 20, 2022
  • Number of updates: 5
  • Update frequency: every 5.0 days
  • Top authors: elementsocean (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /386 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.74ms] Passed 4 tests

An overview of server-side resources used by ElementsOcean
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.67 ▼3.18
Dashboard /wp-admin3.38 ▲0.0847.90 ▼3.10
Posts /wp-admin/edit.php3.50 ▲0.1454.58 ▲2.61
Add New Post /wp-admin/post-new.php5.96 ▲0.0887.54 ▼21.59
Media Library /wp-admin/upload.php3.31 ▲0.0840.72 ▲0.91

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 68 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for ElementsOcean
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲2014.36 ▼0.121.63 ▼0.2340.56 ▼2.69
Dashboard /wp-admin2,209 ▲295.57 ▼0.0887.20 ▼4.0738.74 ▼4.20
Posts /wp-admin/edit.php2,120 ▲202.04 ▲0.0436.95 ▼0.4335.42 ▲0.19
Add New Post /wp-admin/post-new.php1,540 ▲523.23 ▲5.26606.85 ▼16.4154.01 ▼12.76
Media Library /wp-admin/upload.php1,414 ▲144.23 ▲0.07100.03 ▼4.1542.11 ▼2.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please a description for screenshot #2 in elements-ocean/assets to your readme.txt
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

elements-ocean/elementsocean.php 92% from 13 tests

Analyzing the main PHP file in "ElementsOcean" version 1.0.3
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("elements-ocean.php" instead of "elementsocean.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected36,223 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
CSS261,57738920,740
PHP141,2532538,755
HTML131102,826
SVG3001,325
Sass2801,294
JavaScript82441701,283

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity18.75
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods107
▷ Static methods32.80%
▷ Public methods8781.31%
▷ Protected methods2018.69%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants975.00%
▷ Class constants325.00%
▷ Public constants3100.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