78% agent-image-news

Code Review | Agent Image News

WordPress plugin Agent Image News scored78%from 54 tests.

About plugin

  • Plugin page: agent-image-news
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: May 2, 2013
  • Latest release: Aug 16, 2014
  • Number of updates: 12
  • Update frequency: every 39.4 days
  • Top authors: AgentImage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active /5,886 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.74ms] Passed 4 tests

This is a short check of server-side resources used by Agent Image News
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.25 ▼0.33
Dashboard /wp-admin15.03 ▲11.685,858.92 ▲5,794.18
Posts /wp-admin/edit.php3.37 ▲0.0145.00 ▼2.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.94 ▼4.66
Media Library /wp-admin/upload.php3.24 ▲0.0146.10 ▲10.51

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Agent Image News
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,966 ▲22013.31 ▼0.981.73 ▲0.0136.55 ▼7.28
Dashboard /wp-admin2,369 ▲1814.93 ▲0.0696.29 ▼8.6141.87 ▼3.90
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0137.38 ▲2.5834.80 ▼1.15
Add New Post /wp-admin/post-new.php1,535 ▲223.30 ▲0.12623.98 ▼21.4650.45 ▲0.45
Media Library /wp-admin/upload.php1,385 ▼34.30 ▲0.0593.79 ▼2.8240.14 ▼3.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/agent-image-news/html/agent_image_news.html.php
    • > /wp-content/plugins/agent-image-news/html/css/agent_image_news.css.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/agent-image-news/agent_image_news.php:30
    • > PHP Notice
      Undefined variable: plugin_url in wp-content/plugins/agent-image-news/html/css/agent_image_news.css.php on line 26
    • > PHP Notice
      Undefined variable: plugin_url in wp-content/plugins/agent-image-news/html/css/agent_image_news.css.php on line 7
    • > PHP Notice
      Undefined variable: agentimage_blog_feed in wp-content/plugins/agent-image-news/html/agent_image_news.html.php on line 10
    • > PHP Notice
      Undefined variable: agentimage_twitter_feed in wp-content/plugins/agent-image-news/html/agent_image_news.html.php on line 13
    • > PHP Notice
      Undefined variable: plugin_url in wp-content/plugins/agent-image-news/html/css/agent_image_news.css.php on line 18
    • > PHP Notice
      Undefined variable: plugin_url in wp-content/plugins/agent-image-news/html/css/agent_image_news.css.php on line 35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
9 plugin tags: real estate, marketing, real estate marketing, broker, agent image...

agent-image-news/agent_image_news.php 85% from 13 tests

"Agent Image News" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 157 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("agent-image-news.php" instead of "agent_image_news.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin108 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42173108

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
html/images/news-plugin.png13.60KB6.11KB▼ 55.10%
html/images/agentintel_subheader_bk.png1.73KB0.20KB▼ 88.71%