10% aitch-ref

Code Review | aitch ref!

WordPress plugin aitch ref! scored10%from 54 tests.

About plugin

  • Plugin page: aitch-ref
  • Plugin version: 0.9.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Feb 25, 2010
  • Latest release: Jan 30, 2018
  • Number of updates: 91
  • Update frequency: every 31.8 days
  • Top authors: postpostmodern (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,748 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/aitch-ref/index.php+10
    Uncaught Error: Class 'aitchref\AitchRef' not found in wp-content/plugins/aitch-ref/index.php:10
    Stack trace:
    #0 [internal function]: aitchref\{closure}()
    #1 wp-content/plugins/aitch-ref/index.php(15): call_user_func()
    #2 wp-content/plugins/aitch-ref/_plugin.php(18): require('/var/www/wordpr...')
    #3 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #4 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

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

This is a short check of server-side resources used by aitch ref!
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.26 ▲0.19
Dashboard /wp-admin3.31 ▲0.0052.78 ▼1.29
Posts /wp-admin/edit.php3.36 ▲0.0051.95 ▲1.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.38 ▼8.41
Media Library /wp-admin/upload.php3.23 ▲0.0038.57 ▲2.68

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for aitch ref!
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.24 ▼1.071.72 ▼0.4644.11 ▼3.18
Dashboard /wp-admin2,221 ▲154.85 ▼1.20111.59 ▲11.4442.30 ▲1.05
Posts /wp-admin/edit.php2,100 ▼02.05 ▲0.0041.28 ▲5.0635.86 ▲2.13
Add New Post /wp-admin/post-new.php1,545 ▼023.11 ▼0.08693.20 ▲66.6275.08 ▼11.37
Media Library /wp-admin/upload.php1,403 ▲34.27 ▲0.05109.30 ▲10.6048.39 ▲0.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/aitch-ref/views/admin/options-general_footer.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'aitchref\\AitchRef' not found in wp-content/plugins/aitch-ref/index.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_textarea() in wp-content/plugins/aitch-ref/views/admin/options-general-relative.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_textarea() in wp-content/plugins/aitch-ref/views/admin/options-general-absolute.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_textarea() in wp-content/plugins/aitch-ref/views/admin/options-general-urls.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'aitchref\\AitchRef' not found in wp-content/plugins/aitch-ref/index.php:10
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/aitch-ref/tests/bootstrap.php on line 7
    • > PHP Notice
      Undefined variable: version in wp-content/plugins/aitch-ref/views/admin/options-general_footer.php on line 1
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/aitch-ref/tests/bootstrap.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/aitch-ref/tests/test-aitch-ref.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/aitch-ref/views/admin/options-general.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: href, url

aitch-ref/_plugin.php 92% from 13 tests

The entry point to "aitch ref!" version 0.9.9 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("aitch-ref.php" instead of "_plugin.php")

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
There were no executable files found in this plugin441 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP1484138330
Bourne Shell115459
JSON10025
XML10014
CSS13013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.33
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods2086.96%
▷ Protected methods313.04%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin