84% demomentsomtres-optimize

Code Review | DeMomentSomTres Optimize

WordPress plugin DeMomentSomTres Optimize scored84%from 54 tests.

About plugin

  • Plugin page: demomentsomtres-o...
  • Plugin version: 20201021...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.1
  • WordPress version: 6.3.1
  • First release: Jan 27, 2020
  • Latest release: Jan 27, 2020
  • Number of updates: 2
  • Update frequency: every 103.0 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /385 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.63ms] Passed 4 tests

Server-side resources used by DeMomentSomTres Optimize
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.14 ▼7.48
Dashboard /wp-admin3.31 ▲0.0149.27 ▼11.39
Posts /wp-admin/edit.php3.36 ▲0.0042.50 ▼2.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.11 ▲2.67
Media Library /wp-admin/upload.php3.23 ▲0.0036.71 ▲3.75

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for DeMomentSomTres Optimize
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.59 ▼1.161.65 ▼0.5937.63 ▼11.35
Dashboard /wp-admin2,206 ▲214.86 ▼1.02112.02 ▲4.8342.63 ▲0.09
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0235.61 ▲1.1932.33 ▼3.57
Add New Post /wp-admin/post-new.php1,538 ▲1723.07 ▼0.16633.95 ▲29.6849.47 ▲0.40
Media Library /wp-admin/upload.php1,391 ▲34.16 ▼0.03100.66 ▼3.4443.48 ▼2.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/demomentsomtres-optimize/demomentsomtres-optimize.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
No plugin tags provided

demomentsomtres-optimize/demomentsomtres-optimize.php 85% from 13 tests

The primary PHP file in "DeMomentSomTres Optimize" version 20201021... is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "20201021...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin27 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181027

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin