10% aklamator-digital-pr

Code Review | Aklamator - Digital PR

WordPress plugin Aklamator - Digital PR scored 10% from 54 tests.

About plugin

  • Plugin page: aklamator-digital-pr
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.2
  • WordPress version: 5.8.1
  • First release: Feb 25, 2015
  • Latest release: Jan 26, 2018
  • Number of updates: 51
  • Update frequency: every 20.9 days
  • Top authors: aklamator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,666 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method AklamatorPrWidget::set_up_options() should not be called statically

Server metrics [RAM: ▲0.09MB] [CPU: ▼141.10ms] Passed 4 tests

Server-side resources used by Aklamator - Digital PR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1940.80 ▲16.28
Dashboard /wp-admin3.14 ▲0.0952.22 ▲7.32
Posts /wp-admin/edit.php3.23 ▲0.1248.15 ▲1.55
Add New Post /wp-admin/post-new.php5.50 ▲0.0691.85 ▼570.45
Media Library /wp-admin/upload.php3.08 ▲0.0830.56 ▼2.82

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 9 new options
New WordPress options
aklamatorApplicationID
aklamatorSingleWidgetTitle
aklamatorSingleWidgetID
aklamatorCategory
aklamatorPageWidgetID
aklamatorPoweredBy
widget_wp_widget_aklamator
aklamatorFeatured2Feed
aklamatorWidgets

Browser metrics Passed 4 tests

Checking browser requirements for Aklamator - Digital PR
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,697 ▲10115.83 ▼0.1410.07 ▲0.7749.98 ▼3.07
Dashboard /wp-admin2,982 ▲485.84 ▼0.28134.10 ▼32.46118.13 ▼2.91
Posts /wp-admin/edit.php2,773 ▲342.71 ▲0.0165.66 ▲2.8896.72 ▼1.35
Add New Post /wp-admin/post-new.php1,696 ▼1,99118.74 ▲3.62403.08 ▼63.92114.66 ▲4.20
Media Library /wp-admin/upload.php1,770 ▼374.99 ▼0.02132.96 ▼27.44141.31 ▲22.72

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
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method AklamatorPrWidget::aklamator_uninstall() should not be called statically
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_wp_widget_aklamator

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/aklamator-digital-pr/includes/class-aklamator-widget-pr.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/aklamator-digital-pr/views/admin-page.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/aklamator-digital-pr/aklamator-digital-pr.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === aklamator-digital-pr === )
  • Tags: Too many tags (26 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

aklamator-digital-pr/aklamator-digital-pr.php 92% from 13 tests

The main PHP script in "Aklamator - Digital PR" version 2.1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 170 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected833 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP416358511
JavaScript2325228
CSS213394

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity18.50
▷ Minimum class complexity11.00
▷ Maximum class complexity26.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods1986.36%
▷ Protected methods00.00%
▷ Private methods313.64%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
8 PNG files occupy 0.36MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dataTables/images/sort_desc.png1.10KB0.17KB▼ 84.15%
images/teaser-810x262.png279.89KB88.35KB▼ 68.43%
assets/dataTables/images/sort_asc_disabled.png1.09KB0.17KB▼ 84.66%
assets/dataTables/images/sort_both.png1.11KB0.25KB▼ 77.46%
images/promo-300x200.png77.36KB27.52KB▼ 64.43%