94% fotepo

Code Review | Fotepo

WordPress plugin Fotepo scored 94% from 53 tests.

About plugin

  • Plugin page: fotepo
  • Plugin version: 0.5.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-5.2.3
  • WordPress version: 5.8.1
  • First release: Sep 18, 2019
  • Latest release: Sep 19, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tmatsuur (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 323 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼264.50ms] Passed 4 tests

Analyzing server-side resources used by Fotepo
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1432.74 ▲13.69
Dashboard /wp-admin3.08 ▲0.0338.19 ▼1.74
Posts /wp-admin/edit.php3.15 ▲0.0539.66 ▼2.79
Add New Post /wp-admin/post-new.php5.44 ▲0.0192.36 ▼1,039.27
Media Library /wp-admin/upload.php3.02 ▲0.0225.13 ▼14.20

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Fotepo
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,018 ▲43615.89 ▲0.2710.51 ▼0.3949.26 ▼1.87
Dashboard /wp-admin3,117 ▲2705.90 ▲0.01144.34 ▲6.61142.76 ▲37.12
Posts /wp-admin/edit.php2,896 ▲1932.70 ▲0.0269.15 ▲5.03124.85 ▲32.93
Add New Post /wp-admin/post-new.php1,791 ▲31217.42 ▲0.53363.46 ▼21.29150.98 ▲48.62
Media Library /wp-admin/upload.php1,968 ▲1935.02 ▲0.01150.64 ▲5.23148.01 ▲38.86

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fotepo/fontemp.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (`font name` submenu.), #2 (`target` submenu.)
The official readme.txt is a good inspiration

fotepo/fontemp.php 92% from 13 tests

The primary PHP file in "Fotepo" version 0.5.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fotepo.php" instead of "fontemp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin226 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12123226

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
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%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png6.33KB5.85KB▼ 7.53%
screenshot-2.png4.08KB3.73KB▼ 8.61%