84% source-affix

Code Review | Source Affix

WordPress plugin Source Affix scored84%from 54 tests.

About plugin

  • Plugin page: source-affix
  • Plugin version: 2.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Oct 30, 2013
  • Latest release: May 24, 2023
  • Number of updates: 51
  • Update frequency: every 68.5 days
  • Top authors: rabmalin (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

600+ active /14,649 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.43MB] [CPU: ▲4.94ms] Passed 4 tests

Server-side resources used by Source Affix
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2242.70 ▲0.14
Dashboard /wp-admin3.86 ▲0.5552.81 ▲7.08
Posts /wp-admin/edit.php3.91 ▲0.5551.70 ▲6.08
Add New Post /wp-admin/post-new.php6.37 ▲0.4994.92 ▲7.32
Media Library /wp-admin/upload.php3.69 ▲0.4739.06 ▲6.44
Source Affix /wp-admin/options-general.php?page=source-affix3.6939.70

Server storage [IO: ▲0.23MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
nssa_option_migration_complete
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Source Affix: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲23217.52 ▲2.871.91 ▲0.1242.99 ▼5.38
Dashboard /wp-admin2,382 ▲1918.23 ▲3.33149.64 ▲34.5538.40 ▼5.13
Posts /wp-admin/edit.php2,285 ▲1995.31 ▲3.1886.71 ▲50.3129.61 ▼5.53
Add New Post /wp-admin/post-new.php6,260 ▲4,74627.35 ▲9.86932.63 ▲234.1043.25 ▼14.74
Media Library /wp-admin/upload.php1,423 ▲355.56 ▲1.39123.57 ▲22.5241.43 ▼3.44
Source Affix /wp-admin/options-general.php?page=source-affix1,2535.2986.2127.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • nssa_option_migration_complete
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Nilambar\\Optioner\\add_action() in wp-content/plugins/source-affix/vendor/ernilambar/optioner/optioner.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: plugin, classicpress, post, metabox, source...

source-affix/source-affix.php Passed 13 tests

"Source Affix" version 2.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
63 characters long description:
Plugin to add sources in your posts, pages or custom post types

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin2,712 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP207611,4742,433
JSON300149
JavaScript56488
CSS50040
Markdown1102

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity39.70
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods147
▷ Static methods2315.65%
▷ Public methods12585.03%
▷ Protected methods106.80%
▷ Private methods128.16%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants12
▷ Global constants975.00%
▷ Class constants325.00%
▷ Public constants3100.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
No PNG images were found in this plugin