83% dzs-ajaxer-lite-dynamic-page-load

Code Review | DZS Ajaxer Lite - Ajaxify Your Wordpress Site and Comments

WordPress plugin DZS Ajaxer Lite - Ajaxify Your Wordpress Site and Comments scored83%from 54 tests.

About plugin

  • Plugin page: dzs-ajaxer-lite-d...
  • Plugin version: 1.04
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.5
  • WordPress version: 6.3.1
  • First release: Jul 1, 2016
  • Latest release: Jul 3, 2016
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: digitalzoomstudio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,358 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼3.31ms] Passed 4 tests

Server-side resources used by DZS Ajaxer Lite - Ajaxify Your Wordpress Site and Comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2336.39 ▼5.67
Dashboard /wp-admin3.52 ▲0.2248.01 ▲1.26
Posts /wp-admin/edit.php3.64 ▲0.2850.29 ▲6.78
Add New Post /wp-admin/post-new.php6.10 ▲0.2284.55 ▼11.97
Media Library /wp-admin/upload.php3.45 ▲0.2236.36 ▲3.13

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 46 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
dzsajx_mo
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for DZS Ajaxer Lite - Ajaxify Your Wordpress Site and Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲25713.63 ▼0.676.81 ▲4.6638.39 ▼4.94
Dashboard /wp-admin2,241 ▲535.89 ▲0.03111.51 ▲3.7341.49 ▼1.36
Posts /wp-admin/edit.php2,130 ▲382.05 ▲0.0242.35 ▲3.1534.97 ▲4.29
Add New Post /wp-admin/post-new.php1,554 ▲2018.26 ▼5.30584.94 ▼97.8963.38 ▲7.55
Media Library /wp-admin/upload.php1,426 ▲384.24 ▲0.0396.02 ▼10.5042.28 ▼3.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • dzsajx_mo
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/dzs-ajaxer-lite-dynamic-page-load/class_parts/themes_options.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dzs-ajaxer-lite-dynamic-page-load/class-dzsajx.php:59

User-side errors Passed 1 test

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

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 to be fixed:
  • Tags: There are too many tags (15 tag instead of maximum 10)
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
The official readme.txt might help

dzs-ajaxer-lite-dynamic-page-load/ajaxer.php 92% from 13 tests

The principal PHP file in "DZS Ajaxer Lite - Ajaxify Your Wordpress Site and Comments" v. 1.04 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("dzs-ajaxer-lite-dynamic-page-load.php" instead of "ajaxer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin7,404 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
CSS994833,881
PHP44441191,426
XML600922
SVG100399
JavaScript413828314
Sass31300291
HTML150171

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity68.00
▷ Minimum class complexity19.00
▷ Maximum class complexity117.00
Average method complexity5.19
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods1959.38%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/sidebarleft.png1.69KB0.50KB▼ 70.66%
admin/img/gamma-zoombox-close.png1.38KB0.39KB▼ 71.69%
admin/img/sidebarright.png1.68KB0.50KB▼ 70.37%
admin/img/sidebarnone.png1.66KB0.48KB▼ 71.24%
admin/img/icon-hover.png1.55KB0.58KB▼ 62.78%