10% wc-apg-city

Code Review | WC - APG City

WordPress plugin WC - APG City scored10%from 54 tests.

About plugin

  • Plugin page: wc-apg-city
  • Plugin version: 1.2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Aug 11, 2016
  • Latest release: Feb 15, 2023
  • Number of updates: 52
  • Update frequency: every 45.8 days
  • Top authors: artprojectgroup (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /4,818 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.83ms] Passed 4 tests

An overview of server-side resources used by WC - APG City
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0039.80 ▼3.17
Dashboard /wp-admin3.35 ▼0.0452.21 ▼16.04
Posts /wp-admin/edit.php3.40 ▲0.0052.32 ▲4.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0087.32 ▼16.16
Media Library /wp-admin/upload.php3.27 ▲0.0033.53 ▼7.93

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WC - APG City
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲5614.29 ▼0.281.89 ▼0.1641.69 ▲2.19
Dashboard /wp-admin2,189 ▲95.51 ▼0.1683.77 ▼15.8738.54 ▼9.30
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0440.22 ▲2.7734.04 ▲1.15
Add New Post /wp-admin/post-new.php1,526 ▼223.23 ▲0.21663.11 ▼28.9556.59 ▲0.31
Media Library /wp-admin/upload.php1,403 ▲34.22 ▼0.0299.67 ▼8.1043.64 ▼1.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wc-apg-city/includes/cuadro-informacion.php:5

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 93% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can look at the official readme.txt

wc-apg-city/apg-city.php 92% from 13 tests

The principal PHP file in "WC - APG City" v. 1.2.0.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-apg-city.php" instead of "apg-city.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,574 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS21022676
PHP53946303
SVG200270
JavaScript31417182
Markdown1610143

PHP code Passed 2 tests

Analyzing 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.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin