94% ap-companion

Code Review | AP Companion

WordPress plugin AP Companion scored 94% from 54 tests.

About plugin

  • Plugin page: ap-companion
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.5
  • WordPress version: 5.9.2
  • First release: Nov 3, 2019
  • Latest release: Aug 17, 2020
  • Number of updates: 10
  • Update frequency: every 29.7 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

4,000+ active / 28,015 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼321.39ms] Passed 4 tests

Server-side resources used by AP Companion
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0360.00 ▲1.24
Dashboard /wp-admin3.44 ▲0.0341.14 ▼40.37
Posts /wp-admin/edit.php3.67 ▲0.0343.50 ▲3.92
Add New Post /wp-admin/post-new.php6.91 ▼0.0798.56 ▼1,245.72
Media Library /wp-admin/upload.php3.32 ▲0.0228.75 ▼0.72

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 108 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

AP Companion: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,805 ▲6115.23 ▼0.726.29 ▲0.152.77 ▲0.63
Dashboard /wp-admin2,895 ▲346.16 ▼0.02120.88 ▼22.76156.90 ▼5.73
Posts /wp-admin/edit.php2,702 ▲113.23 ▼0.0167.11 ▼6.68142.95 ▼54.64
Add New Post /wp-admin/post-new.php1,667 ▲718.14 ▼2.19396.13 ▼5.92167.77 ▲9.11
Media Library /wp-admin/upload.php1,708 ▲75.54 ▲0.01141.76 ▲0.51178.83 ▼7.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
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 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/ap-companion/includes/helper-functions.php:72
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/ap-companion/includes/helper-functions.php on line 69
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/ap-companion/includes/helper-functions.php on line 69
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ap-companion/includes/helper-functions.php on line 69

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: elements, page-builder, elementor

ap-companion/ap-companion.php 92% from 13 tests

The main file in "AP Companion" v. 1.0.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected17,849 lines of code in 95 files:
LanguageFilesBlank linesComment linesLines of code
PHP802,6691,16411,712
CSS6481855,328
JavaScript6100164594
SVG310215

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.01
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces75
Interfaces0
Traits0
Classes78
▷ Abstract classes11.28%
▷ Concrete classes7798.72%
▷ Final classes11.30%
Methods392
▷ Static methods61.53%
▷ Public methods26166.58%
▷ Protected methods12832.65%
▷ Private methods30.77%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/layouts.png7.33KB2.29KB▼ 68.74%
assets/img/Hd-logo.png7.62KB2.92KB▼ 61.73%
assets/img/testimonial-quote.png0.44KB0.43KB▼ 3.32%