89% ephoto-plugin

Code Review | Ephoto Dam

WordPress plugin Ephoto Dam scored89%from 54 tests.

About plugin

  • Plugin page: ephoto-plugin
  • Plugin version: 3.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 2, 2010
  • Latest release: Dec 21, 2022
  • Number of updates: 32
  • Update frequency: every 148.2 days
  • Top authors: Einden Studio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,568 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.40ms] Passed 4 tests

This is a short check of server-side resources used by Ephoto Dam
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.44 ▲2.26
Dashboard /wp-admin3.36 ▲0.0249.32 ▼8.13
Posts /wp-admin/edit.php3.41 ▲0.0645.55 ▼6.85
Add New Post /wp-admin/post-new.php5.95 ▲0.0782.66 ▼22.79
Media Library /wp-admin/upload.php3.29 ▲0.0631.69 ▼3.81
Ephoto Dam /wp-admin/options-general.php?page=ephoto-options3.2733.97

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
ephoto-dam
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ephoto Dam
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.54 ▼0.818.70 ▲6.8244.23 ▼8.28
Dashboard /wp-admin2,202 ▲225.58 ▼0.0495.51 ▲0.4843.72 ▼0.89
Posts /wp-admin/edit.php2,101 ▼22.01 ▲0.0533.66 ▼9.8037.69 ▼1.11
Add New Post /wp-admin/post-new.php6,208 ▲4,68218.93 ▼4.55931.61 ▲259.3439.19 ▼16.22
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.0393.87 ▼4.6544.25 ▼2.88
Ephoto Dam /wp-admin/options-general.php?page=ephoto-options8472.0322.7526.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 everything seems fine, this is not an exhaustive test

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Administration interface), #2 (Insert a block, call the Ephoto Dam software and select a media file), #3 (Manage your media file easily in the Gutenberg editor)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === ephoto-plugin === )
The official readme.txt is a good inspiration

ephoto-plugin/ephoto-dam.php 77% from 13 tests

The primary PHP file in "Ephoto Dam" version 3.1.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ephoto-plugin.php" instead of "ephoto-dam.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)

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
No dangerous file extensions were detected765 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript411493370
PHP7115140323
CSS3121169
JSON3003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.21MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png109.93KB38.73KB▼ 64.77%
images/close.png1.48KB1.73KB0.00%
screenshot-1.png30.11KB11.74KB▼ 61.00%
screenshot-2.png72.71KB27.23KB▼ 62.55%