84% pixfields

Code Review | PixFields

WordPress plugin PixFields scored 84% from 53 tests.

About plugin

  • Plugin page: pixfields
  • Plugin version: 0.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-5.2.0
  • WordPress version: 5.8.1
  • First release: Mar 2, 2015
  • Latest release: May 31, 2019
  • Number of updates: 15
  • Update frequency: every 103.6 days
  • Top authors: euthelup (86.67%)babbardel (20%)

Code review

53 tests

User reviews

1 review

Install metrics

4,000+ active / 16,510 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼271.59ms] Passed 4 tests

Analyzing server-side resources used by PixFields
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.15 ▲0.3239.20 ▲6.74
Dashboard /wp-admin3.36 ▲0.3146.95 ▲7.34
Posts /wp-admin/edit.php3.41 ▲0.3146.64 ▲1.42
Add New Post /wp-admin/post-new.php5.67 ▲0.2495.31 ▼1,087.74
Media Library /wp-admin/upload.php3.30 ▲0.3031.81 ▼6.79
PixFields /wp-admin/options-general.php?page=pixfields3.2830.17

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 85 new files
Database: no new tables, 1 new option
New WordPress options
pixfields_settings

Browser metrics Passed 4 tests

PixFields: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲7216.22 ▲0.637.84 ▲0.0350.43 ▲2.59
Dashboard /wp-admin2,935 ▲825.96 ▲0.10132.38 ▼0.60108.36 ▲5.44
Posts /wp-admin/edit.php2,713 ▲72.69 ▼0.0061.48 ▼4.2892.10 ▼1.91
Add New Post /wp-admin/post-new.php2,029 ▲37819.10 ▲1.68370.68 ▲6.92131.74 ▲23.08
Media Library /wp-admin/upload.php1,777 ▲54.99 ▼0.02153.34 ▲4.47108.77 ▼8.75
PixFields /wp-admin/options-general.php?page=pixfields1,2452.6064.8176.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • pixfields_settings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'pixfields' not found in wp-content/plugins/pixfields/views/admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/pixfields/settings/fields_manager.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/pixfields/settings/general.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/pixfields/core/defaults.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: fields, metadata, custom

pixfields/pixfields.php 85% from 13 tests

The main PHP file in "PixFields" ver. 0.7.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin6,400 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
CSS31,020222,483
PHP485891,1231,779
Sass1560261,479
SVG100399
JavaScript25686217
Markdown17026
XML10011
Ruby2236

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.75
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods145
▷ Static methods2920.00%
▷ Public methods12888.28%
▷ Protected methods1711.72%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin