93% fotkipress

Code Review | FotkiPress

WordPress plugin FotkiPress scored 93% from 54 tests.

About plugin

  • Plugin page: fotkipress
  • Plugin version: 0.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8
  • WordPress version: 5.8.1
  • First release: Nov 11, 2017
  • Latest release: Feb 4, 2018
  • Number of updates: 5
  • Update frequency: every 17.2 days
  • Top authors: fotkin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 407 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼157.31ms] Passed 4 tests

Analyzing server-side resources used by FotkiPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.35 ▲0.6340.79 ▲21.51
Dashboard /wp-admin3.58 ▲0.5249.50 ▲2.96
Posts /wp-admin/edit.php3.62 ▲0.5250.76 ▲4.04
Add New Post /wp-admin/post-new.php3.36 ▼2.0729.52 ▼629.14
Media Library /wp-admin/upload.php3.52 ▲0.5134.82 ▼7.09

Server storage [IO: ▲0.62MB] [DB: ▲0.62MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • The plugin illegally modified 1 file (0.06KB) outside of "wp-content/plugins/fotkipress/" and "wp-content/uploads/"
    • (new file) wp-content/fotkipress/.fotkipress/settings.2BhP7qJ4bE9Feft39zXXCehwtKOrVA.json
Filesystem: 70 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by FotkiPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,722 ▲12616.20 ▲0.199.36 ▲2.4047.32 ▼4.88
Dashboard /wp-admin2,993 ▲595.91 ▼0.21155.98 ▲6.64111.32 ▼8.56
Posts /wp-admin/edit.php2,759 ▲202.69 ▼0.0073.53 ▲2.63106.90 ▲10.66
Add New Post /wp-admin/post-new.php1,696 ▲1317.97 ▼0.73370.52 ▼4.33117.73 ▼6.04
Media Library /wp-admin/upload.php1,830 ▲265.02 ▼0.01153.18 ▼0.45119.54 ▼10.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
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 short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fotkipress/lib/class.fotkipress-file-indexes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fotkipress/public/class.fotkipress-public-routes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fotkipress/public/class.fotkipress-init-public.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fotkipress/index.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fotkipress/admin/class.fotkipress-admin-routes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/fotkipress/plugin-admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fotkipress/admin/class.fotkipress-init-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fotkipress/admin/forms/class.fotkipress-feedbackform.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fotkipress/admin/forms/class.fotkipress-settingsform.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fotkipress/public/class.fotkipress-shortcode.php:3

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 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
  • Plugin Name: You should set the name of your plugin on the first line ( === fotkipress === )
The official readme.txt might help

fotkipress/index.php 92% from 13 tests

The entry point to "FotkiPress" version 0.0.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("fotkipress.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin10,306 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
JSON2004,043
PHP25998113,039
Vuejs Component17324101,424
JavaScript19365271,273
CSS31090471
SVG10056

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity22.81
▷ Minimum class complexity1.00
▷ Maximum class complexity142.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods180
▷ Static methods180100.00%
▷ Public methods180100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions770.00%
▷ Anonymous functions330.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin