10% aklamator-pro-adsense

Code Review | Aklamator Pro Adsense

WordPress plugin Aklamator Pro Adsense scored10%from 54 tests.

About plugin

  • Plugin page: aklamator-pro-ads...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.2
  • WordPress version: 6.3.1
  • First release: Mar 27, 2015
  • Latest release: Jan 26, 2018
  • Number of updates: 38
  • Update frequency: every 27.3 days
  • Top authors: aklamator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,110 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method AklamatorWidgetPro::set_up_optionsPro() should not be called statically

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.44ms] Passed 4 tests

Server-side resources used by Aklamator Pro Adsense
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1145.18 ▼2.62
Dashboard /wp-admin25.26 ▲0.264,372,139.64 ▲9,095.77
Posts /wp-admin/edit.php3.57 ▲0.1656.19 ▲2.07
Add New Post /wp-admin/post-new.php6.03 ▲0.1088.53 ▼17.54
Media Library /wp-admin/upload.php3.38 ▲0.1040.52 ▲4.35

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 21 new options
New WordPress options
widget_wp_widget_aklamatorpro
aklamatorProAds1Name
db_upgraded
widget_recent-comments
aklamatorProAds2Name
aklamatorProApplicationID
aklamatorProAds3Name
aklamatorProPageWidgetID
can_compress_scripts
theysaidso_admin_options
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Aklamator Pro Adsense
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.73 ▲0.161.70 ▼0.2943.91 ▼2.48
Dashboard /wp-admin2,195 ▲245.56 ▼0.2787.03 ▼17.8077.88 ▲26.65
Posts /wp-admin/edit.php2,121 ▲211.99 ▲0.0437.61 ▲2.0333.78 ▼2.14
Add New Post /wp-admin/post-new.php1,554 ▲2822.97 ▲0.15717.79 ▲1.7959.61 ▲1.30
Media Library /wp-admin/upload.php1,406 ▲34.22 ▲0.05107.57 ▲4.8378.04 ▲31.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method AklamatorWidgetPro::aklamatorPro_uninstall() should not be called statically
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_wp_widget_aklamatorpro
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/aklamator-pro-adsense/aklamator-pro-adsense-admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/aklamator-pro-adsense/aklamator-pro-adsense.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/aklamator-pro-adsense/includes/class-aklamator-pro-widget-adsense.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/aklamator-pro-adsense/views/admin-page.php:8

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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === aklamator-pro-adsense === )
  • Tags: Too many tags (26 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

aklamator-pro-adsense/aklamator-pro-adsense.php 92% from 13 tests

"Aklamator Pro Adsense" version 2.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 273 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 detected1,302 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP531674966
JavaScript2325237
CSS213399

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity30.00
▷ Minimum class complexity13.00
▷ Maximum class complexity39.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods13.57%
▷ Public methods2485.71%
▷ Protected methods00.00%
▷ Private methods414.29%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.36MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/aklamator-icon.png2.00KB1.12KB▼ 44.28%
images/teaser-810x262.png279.89KB88.35KB▼ 68.43%
assets/dataTables/images/sort_both.png1.11KB0.25KB▼ 77.46%
assets/dataTables/images/sort_asc_disabled.png1.09KB0.17KB▼ 84.66%
assets/dataTables/images/sort_desc_disabled.png1.09KB0.17KB▼ 84.55%