68% airpress

Code Review | Airpress

WordPress plugin Airpress scored 68% from 54 tests.

About plugin

  • Plugin page: airpress
  • Plugin version: 1.1.62
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.1
  • WordPress version: 5.9.2
  • First release: Jan 13, 2017
  • Latest release: Apr 7, 2020
  • Number of updates: 79
  • Update frequency: every 14.9 days
  • Top authors: chetmac (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active / 12,375 total downloads

Benchmarks

Plugin footprint 65% 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: ▲4.42MB] [CPU: ▼277.01ms] Passed 4 tests

An overview of server-side resources used by Airpress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.21 ▲4.7078.00 ▲27.83
Dashboard /wp-admin8.23 ▲4.8259.85 ▲26.54
Posts /wp-admin/edit.php8.23 ▲4.5968.68 ▲26.14
Add New Post /wp-admin/post-new.php10.54 ▲3.57116.48 ▼1,183.78
Media Library /wp-admin/upload.php8.23 ▲4.9448.60 ▲23.07
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius8.2347.36

Server storage [IO: ▲4.22MB] [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: 197 new files
Database: no new tables, 4 new options
New WordPress options
fs_accounts
fs_debug_mode
fs_active_plugins
fs_gdpr

Browser metrics Passed 4 tests

Checking browser requirements for Airpress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,976 ▲25416.11 ▲0.1610.44 ▲4.892.37 ▲0.05
Dashboard /wp-admin2,977 ▲1196.19 ▼0.10119.62 ▼14.40171.95 ▲8.98
Posts /wp-admin/edit.php2,778 ▲873.28 ▲0.0564.11 ▼2.99157.89 ▲15.03
Add New Post /wp-admin/post-new.php1,699 ▼5315.85 ▼5.76411.29 ▼46.32155.69 ▼6.15
Media Library /wp-admin/upload.php1,788 ▲905.58 ▲0.08146.69 ▲7.93204.92 ▲16.20
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius1,4722.5455.76113.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/airpress/freemius/includes/class-freemius.php+8218
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 4 options
    • fs_accounts
    • fs_debug_mode
    • fs_active_plugins
    • fs_gdpr

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/airpress/freemius/templates/ajax-loader.php
  • 23× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/airpress/lib/chetmac/AirpressForm.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/airpress/lib/chetmac/AirpressForm.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/airpress/lib/chetmac/AirpressForm.php on line 5
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/airpress/freemius/templates/account/partials/addon.php on line 6
    • > PHP Warning
      strpos(): Offset not contained in string in wp-content/plugins/airpress/lib/chetmac/AirpressForm.php on line 194
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/airpress/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/airpress/lib/chetmac/AirpressAdmin.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/airpress/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/airpress/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/airpress/lib/chetmac/AirpressVirtualFieldsAdmin.php:15

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === airpress === )
Please take inspiration from this readme.txt

airpress/airpress.php Passed 13 tests

The entry point to "Airpress" version 1.1.62 is a PHP file that has certain tags in its header comment area
88 characters long description:
Extend Wordpress Posts, Pages, and Custom Fields with data from remote Airtable records.

Code Analysis 97% from 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 plugin51,012 lines of code in 153 files:
LanguageFilesBlank linesComment linesLines of code
PHP1228,66216,49834,066
PO File137,5319,16116,474
Markdown2830226
JavaScript43559205
JSON10027
CSS110014

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,772)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity82.93
▷ Minimum class complexity1.00
▷ Maximum class complexity2,772.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes00.00%
Methods1,292
▷ Static methods17813.78%
▷ Public methods90570.05%
▷ Protected methods564.33%
▷ Private methods33125.62%
Functions186
▷ Named functions18498.92%
▷ Anonymous functions21.08%
Constants122
▷ Global constants9678.69%
▷ Class constants2621.31%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%