84% fotomoto

Code Review | Fotomoto

WordPress plugin Fotomoto scored84%from 54 tests.

About plugin

  • Plugin page: fotomoto
  • Plugin version: 1.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-5.8.3
  • WordPress version: 6.3.1
  • First release: Jun 11, 2010
  • Latest release: Jan 26, 2022
  • Number of updates: 48
  • Update frequency: every 88.5 days
  • Top authors: Fotomoto (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /26,462 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼10.21ms] Passed 4 tests

Analyzing server-side resources used by Fotomoto
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0738.02 ▼8.60
Dashboard /wp-admin3.39 ▲0.0447.67 ▼15.29
Posts /wp-admin/edit.php3.50 ▲0.1452.77 ▼1.21
Add New Post /wp-admin/post-new.php5.97 ▲0.0896.70 ▼10.92
Media Library /wp-admin/upload.php3.31 ▲0.0835.62 ▼6.02
Fotomoto /wp-admin/options-general.php?page=fotomoto3.3536.54

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: 1 new table, 7 new options
New tables
wp_fotomoto_categorymeta
New WordPress options
db_upgraded
fotomoto_options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Fotomoto: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.34 ▼0.021.66 ▼0.0940.22 ▼6.24
Dashboard /wp-admin2,202 ▲225.63 ▼0.0497.23 ▲7.8843.17 ▼3.51
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0839.43 ▲4.2336.88 ▼1.92
Add New Post /wp-admin/post-new.php1,529 ▲423.81 ▲0.26659.33 ▲6.1560.34 ▲10.40
Media Library /wp-admin/upload.php1,407 ▲104.14 ▼0.0498.85 ▼14.4644.18 ▼9.50
Fotomoto /wp-admin/options-general.php?page=fotomoto1,1692.0541.5454.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fotomoto_get_option() in wp-content/plugins/fotomoto/options.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/fotomoto/fotomoto.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_userdata() in wp-content/plugins/fotomoto/site_key.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
You can take inspiration from this readme.txt

fotomoto/fotomoto.php Passed 13 tests

The main file in "Fotomoto" v. 1.2.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
15 characters long description:
Fotomoto Plugin

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 plugin705 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3918663
CSS14022
JavaScript15220

PHP code Passed 2 tests

A brief analysis 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.47
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%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected