63% ap-custom-testimonial

Code Review | Testimonial WordPress Plugin - AP Custom Testimonial

WordPress plugin Testimonial WordPress Plugin - AP Custom Testimonial scored 63% from 54 tests.

About plugin

  • Plugin page: ap-custom-testimo...
  • Plugin version: 1.4.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 5.8.1
  • First release: Apr 1, 2016
  • Latest release: Jan 25, 2022
  • Number of updates: 66
  • Update frequency: every 32.2 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

4,000+ active / 91,727 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼147.51ms] Passed 4 tests

A check of server-side resources used by Testimonial WordPress Plugin - AP Custom Testimonial
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.1222.19 ▼0.88
Dashboard /wp-admin3.27 ▲0.2041.80 ▲5.69
Posts /wp-admin/edit.php3.32 ▲0.2134.70 ▲3.15
Add New Post /wp-admin/post-new.php5.55 ▲0.1174.90 ▼590.80
Media Library /wp-admin/upload.php3.13 ▲0.1222.49 ▼1.52
View Testimonial /wp-admin/admin.php?page=apct_testimonial_view3.1420.77
Edit Testimonial /wp-admin/admin.php?page=apct_testimonial_edit3.1822.79
Create Testimonial /wp-admin/admin.php?page=apct_testimonial_create3.1926.81

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 65 new files
Database: 1 new table, 3 new options
New tables
wp_apct_testimonial_detail
New WordPress options
apct-settings
apct_tes_fonts
widget_apct_widget

Browser metrics Passed 4 tests

Checking browser requirements for Testimonial WordPress Plugin - AP Custom Testimonial
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,094 ▲49318.21 ▲2.2610.24 ▲1.38117.69 ▲41.41
Dashboard /wp-admin3,188 ▲2938.64 ▲2.52144.11 ▲6.39182.94 ▲12.16
Posts /wp-admin/edit.php3,031 ▲2945.04 ▲1.8084.39 ▲19.94138.20 ▼1.68
Add New Post /wp-admin/post-new.php1,937 ▼1,76921.38 ▲2.34373.24 ▼55.17160.88 ▼5.68
Media Library /wp-admin/upload.php1,815 ▲636.04 ▲0.49111.90 ▼36.37184.21 ▼4.89
View Testimonial /wp-admin/admin.php?page=apct_testimonial_view1,4014.8376.12115.59
Edit Testimonial /wp-admin/admin.php?page=apct_testimonial_edit2,54910.67213.45247.05
Create Testimonial /wp-admin/admin.php?page=apct_testimonial_create2,53110.79188.26216.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_apct_testimonial_detail
  • Zombie WordPress options were found after uninstall: 3 options
    • apct_tes_fonts
    • widget_apct_widget
    • apct-settings

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_view
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_view_testimonial.php+6
    Undefined variable: entry_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_edit
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_current_testimonial.php+41
    Undefined variable: row
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_edit
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_current_testimonial.php+41
    Trying to get property 'author_name' of non-object
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_edit
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_current_testimonial.php+118
    Undefined variable: testim_description
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_edit
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_current_testimonial.php+118
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_view
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_view_testimonial.php+79
    Undefined variable: new_publiced_date
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_edit
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_current_testimonial.php+32
    Undefined index: id

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
The following issues need your attention
  • 21× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/ap-custom-testimonial/inc/backend/activate.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/frontend/templates/template-1.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/frontend/shortcode.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/model-control/apct-testimonial-action.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/frontend/templates/template-2.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/backend/save-settings.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/model/apct_new_testimonial.php
    • > /wp-content/plugins/ap-custom-testimonial/ap-custom-testimonial.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/backend/apct-about.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/backend/main-page.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ap-custom-testimonial/inc/backend/apct-sidebar.php:14
    • > PHP Warning
      Use of undefined constant APCT_IMAGE_DIR - assumed 'APCT_IMAGE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/ap-custom-testimonial/inc/backend/apct-sidebar.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: testimonial shortcode, easy, simple, testimonial slider, testimonials...

ap-custom-testimonial/ap-custom-testimonial.php Passed 13 tests

The main file in "Testimonial WordPress Plugin - AP Custom Testimonial" v. 1.4.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
38 characters long description:
A plugin to add testimonial to a site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin7,498 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
CSS6911554,271
PHP231341162,439
SVG100565
JavaScript32529223

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity16.50
▷ Minimum class complexity8.00
▷ Maximum class complexity25.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 0.14MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_flat_10_000000_40x100.png0.20KB0.08KB▼ 57.56%
css/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
images/ap-custom-testimonial-upgrade-to-pro.png48.15KB17.38KB▼ 63.90%
css/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%
images/default.png5.65KB3.26KB▼ 42.31%