84% fotoexpose

Code Review | FotoExposé

WordPress plugin FotoExposé scored 84% from 54 tests.

About plugin

  • Plugin page: fotoexpose
  • Plugin version: 1.0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.5.0
  • WordPress version: 6.3.1
  • First release: May 12, 2015
  • Latest release: Apr 20, 2016
  • Number of updates: 19
  • Update frequency: every 21.5 days
  • Top authors: montanan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 810 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.01MB] [CPU: ▼2.11ms] Passed 4 tests

This is a short check of server-side resources used by FotoExposé
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.29 ▼0.12
Dashboard /wp-admin3.31 ▲0.0144.27 ▼0.04
Posts /wp-admin/edit.php3.36 ▲0.0148.18 ▼0.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.18 ▼8.12
Media Library /wp-admin/upload.php3.24 ▲0.0136.79 ▲4.97

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for FotoExposé
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲15013.56 ▼0.769.25 ▲7.6138.45 ▼8.20
Dashboard /wp-admin2,209 ▲215.85 ▲0.9594.57 ▼6.8937.97 ▼7.02
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0539.91 ▲0.5535.09 ▲1.46
Add New Post /wp-admin/post-new.php1,547 ▲2818.46 ▼4.60635.46 ▼16.1870.34 ▲0.57
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0793.60 ▼4.2942.70 ▼0.37

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/fotoexpose/includes/fotoexpose-controller.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/fotoexpose/includes/fotoexpose-controller.php:16

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 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
8 plugin tags: posts, slideshow, photos, shortcode, plugin...

fotoexpose/fotoexpose.php 92% from 13 tests

The primary PHP file in "FotoExposé" version 1.0.3.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 385 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin532 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42511224
CSS17141208
PHP46448100

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.33
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.49MB with 0.38MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png504.53KB115.41KB▼ 77.13%